34 lines
1.4 KiB
C#
34 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using OAService.Infrastructure.DAL.Context;
|
|
using TecniStamp.Domain;
|
|
|
|
namespace TecniStamp.Infrastructure.DAL.Context;
|
|
|
|
public class TecniStampDbContext : OAServiceContext
|
|
{
|
|
public TecniStampDbContext() : base() { }
|
|
public TecniStampDbContext(DbContextOptions options) : base(options) { }
|
|
|
|
public DbSet<Cliente> Cliente { get; set; }
|
|
public DbSet<Commessa> Commessa { get; set; }
|
|
public DbSet<CommessaPosizione> ComessaPosizione { get; set; }
|
|
public DbSet<ComuneIstat> ComuneIstat { get; set; }
|
|
public DbSet<Feature> Feature { get; set; }
|
|
public DbSet<Lavorazione> Lavorazione { get; set; }
|
|
public DbSet<Macchinario> Macchinario { get; set; }
|
|
public DbSet<Permission> Permission { get; set; }
|
|
public DbSet<ProvinciaIstat> ProvinciaIstat { get; set; }
|
|
public DbSet<Ruolo> Ruolo { get; set; }
|
|
public DbSet<Sezione> Sezione { 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=TecniStamp;Persist Security Info=True;User ID=tecnistamp_user;Password=XKwPd19vNjAzRFRM;TrustServerCertificate=True");
|
|
}
|
|
}
|
|
} |