updated sample about InMemory

EFCore3_Reforged
Marc CHEVALDONNE 6 years ago
parent eff3011fe3
commit 203d6245bc

@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore;
namespace ex_041_004_InMemory
{
public class NounoursContext : DbContext
{
public DbSet<Nounours> Nounours { get; set; }
public NounoursContext()
{ }
public NounoursContext(DbContextOptions<NounoursContext> 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;");
}
}
}
}
Loading…
Cancel
Save