21 lines
735 B
C#
21 lines
735 B
C#
using DatabaseImplement.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace DatabaseImplement
|
|
{
|
|
public class Database : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (optionsBuilder.IsConfigured == false)
|
|
{
|
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=EnterpriseDataBase;Integrated Security=True;MultipleActiveResultSets=True; TrustServerCertificate=True");
|
|
}
|
|
base.OnConfiguring(optionsBuilder);
|
|
}
|
|
|
|
public virtual DbSet<Provider> Providers { get; set; }
|
|
public virtual DbSet<OrganisationType> OrganisationTypes { get; set; }
|
|
}
|
|
}
|