25 lines
874 B
C#
25 lines
874 B
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<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");
|
|
}
|
|
|
|
}
|
|
} |