diff --git a/p08_BDD_EntityFramework/ex_041_004_InMemory/NounoursContext.cs b/p08_BDD_EntityFramework/ex_041_004_InMemory/NounoursContext.cs new file mode 100644 index 0000000..0e76015 --- /dev/null +++ b/p08_BDD_EntityFramework/ex_041_004_InMemory/NounoursContext.cs @@ -0,0 +1,24 @@ +using Microsoft.EntityFrameworkCore; + +namespace ex_041_004_InMemory +{ + public class NounoursContext : DbContext + { + public DbSet Nounours { get; set; } + + public NounoursContext() + { } + + public NounoursContext(DbContextOptions options) + : base(options) + { } + + protected override void OnConfiguring(DbContextOptionsBuilder options) + { + if (!options.IsConfigured) + { + options.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=ex_041_004_InMemory.Nounours.mdf;Trusted_Connection=True;"); + } + } + } +}