This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = new DashboardOptions | |
{ | |
Authorization = new IDashboardAuthorizationFilter[] | |
{ | |
new HangfireDashboardJwtAuthorizationFilter(this.tokenValidationParameters, "Admin") | |
} | |
}; | |
app.UseHangfireDashboard("/main/admin/hangfire", options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Notification | |
{ | |
public long Id { get; set; } | |
public string TemplateName { get; set; } | |
public long UserId { get; set; } | |
public string EntityId { get; set; } | |
public DateTime Date { get; set; } | |
public DateTime? EmailNotificationSentDate { get; set; } | |
public DateTime? PushNotificationSentDate { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DDTConfiguration : IEntityTypeConfiguration<DDT> | |
{ | |
public void Configure(EntityTypeBuilder<DDT> builder) | |
{ | |
builder.ToTable("DDT"); | |
builder.HasKey(ddt => new { ddt.Prefix, ddt.Id, ddt.Date }); | |
builder.Property(ddt => ddt.Id).HasColumnName("Id"); | |
builder.Property(ddt => ddt.UserId).HasColumnName("UserId"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected virtual object[] GetKeysValues(TEntity entity) | |
{ | |
var entry = Context.Entry(entity); | |
return entry.Metadata.FindPrimaryKey() | |
.Properties | |
.Select(p => entry.Property(p.Name).CurrentValue) | |
.ToArray(); | |
} | |
public string GenerateEntityId(TEntity entity) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected virtual Type[] GetKeysTypes() | |
{ | |
var model = Context.Set<TEntity>().GetService<IDbContextServices>().Model; | |
var entityType = model.FindEntityType(typeof(TEntity).ToString()); | |
return entityType.FindPrimaryKey() | |
.Properties | |
.Select(p => p.ClrType) | |
.ToArray(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
// Solo un semplice metodo di test | |
app.get('/', (req, res) => { | |
res.send('Hello World!'); | |
}); | |
// Qui faccio la send dentro alla then | |
app.get('/test1', (req, res) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema--> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true"> | |
<extensions> | |
<add assembly="Sentry.NLog" /> | |
</extensions> | |
<targets> | |
<target xsi:type="File" name="file" layout="${date}|${level:uppercase=true}|${message} ${exception:format=tostring}|${logger}|${all-event-properties}" fileName="${basedir}/logs/logfile.txt" archiveFileName="${basedir}/logs/logfile.{#}.txt" archiveEvery="Day" maxArchiveFiles="7" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as path from 'path'; | |
import { from } from 'rxjs'; | |
import { filter, tap } from 'rxjs/operators'; | |
const angularFile = require(path.join(__dirname, 'angular.json')); | |
console.log('Start: do something only on my libraries'); | |
from(Object.keys(angularFile.projects)).pipe( | |
filter(key => angularFile.projects[key].projectType === 'library'), |
OlderNewer