37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using Microsoft.AspNetCore.Identity;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using System.Reflection.Emit;
|
|
using WebDoorCreator.Data.DbModels;
|
|
|
|
namespace WebDoorCreator.Data
|
|
{
|
|
public class ConfigConfiguration : IEntityTypeConfiguration<ConfigModel>
|
|
{
|
|
#region Public Methods
|
|
|
|
public void Configure(EntityTypeBuilder<ConfigModel> builder)
|
|
{
|
|
// aggiungo config URL x generazione immagini report
|
|
builder.HasData(
|
|
seedConfig("prt_ImageCodeBaseUrl", "https://iis01.egalware.com/WDC/SRV/api/", "https://seriate.egalware.com/WDC/SRV/api/", "URL di base per recupero immagini png"),
|
|
seedConfig("prt_ReportServerUrl", "http://w2019-sql-steam/reportserver?/Test/WebDoor/", "http://w2019-sql-steam/reportserver?/Test/WebDoor/", "URL di base del Report Server")
|
|
);
|
|
}
|
|
|
|
#endregion Public Methods
|
|
|
|
protected ConfigModel seedConfig(string chiave, string valore, string valoreStd, string note)
|
|
{
|
|
var newRec = new ConfigModel()
|
|
{
|
|
chiave = chiave,
|
|
valore = valore,
|
|
valoreStd = valoreStd,
|
|
note = note
|
|
};
|
|
return newRec;
|
|
}
|
|
|
|
}
|
|
} |