You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mchsamples-.net-core/p08_BDD_EntityFramework/ex_041_004_TestingInMemory/NounoursContext.cs

25 lines
667 B

using Microsoft.EntityFrameworkCore;
namespace ex_041_004_TestingInMemory
{
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_TestingInMemory.Nounours.mdf;Trusted_Connection=True;");
}
}
}
}