Commit ebcadca6 authored by Almouhannad's avatar Almouhannad

(B) Update Dbcontext

parent c42fa9c1
...@@ -4,10 +4,9 @@ namespace Persistence.Context; ...@@ -4,10 +4,9 @@ namespace Persistence.Context;
public partial class ClinicsDbContext : DbContext public partial class ClinicsDbContext : DbContext
{ {
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) public ClinicsDbContext(DbContextOptions<ClinicsDbContext> options)
: base(options)
{ {
// TODO: Use options pattern
optionsBuilder.UseSqlServer("server=.\\;database=Clinics;Trusted_Connection=True; Encrypt=False;MultipleActiveResultSets=true");
} }
protected override void OnModelCreating(ModelBuilder modelBuilder) protected override void OnModelCreating(ModelBuilder modelBuilder)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment