37 lines
1.5 KiB
C#
37 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using OAService.Infrastructure.DAL.Context;
|
|
using StandManager.Domain.Entita;
|
|
|
|
namespace StandManager.Infrastructure.DAL.Context;
|
|
|
|
public class StandManagerDbContext : OAServiceContext
|
|
{
|
|
public StandManagerDbContext() : base() { }
|
|
public StandManagerDbContext(DbContextOptions options) : base(options) { }
|
|
|
|
|
|
public DbSet<Cliente> Cliente { get; set; }
|
|
public DbSet<ComuneIstat> ComuneIstat { get; set; }
|
|
public DbSet<Destinazione> Destinazione { get; set; }
|
|
public DbSet<Evento> Evento { get; set; }
|
|
public DbSet<InvitoEvento> InvitoEvento { get; set; }
|
|
public DbSet<IscrizioneEvento> IscrizioneEvento { get; set; }
|
|
public DbSet<Permission> Permission { get; set; }
|
|
public DbSet<ProvinciaIstat> Provincie { get; set; }
|
|
public DbSet<Referente> Referente { get; set; }
|
|
public DbSet<Ruolo> Ruolo { get; set; }
|
|
public DbSet<Sezione> Sezione { get; set; }
|
|
public DbSet<TipologiaCliente> TipologiaCliente { get; set; }
|
|
public DbSet<Utente> Utente { get; set; }
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
if (!optionsBuilder.IsConfigured)
|
|
{
|
|
optionsBuilder.UseSqlServer("Data Source=192.168.0.233\\SQL2019;Initial Catalog=DAC_StandManager;Persist Security Info=True;User ID=dac_user;Password=KZ4ZrUPzJV;TrustServerCertificate=True");
|
|
}
|
|
}
|
|
} |