Skip to content

Instantly share code, notes, and snippets.

@joewashington75
Created March 25, 2020 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joewashington75/3bab9c05920dcb487a7efa8150c301bd to your computer and use it in GitHub Desktop.
Save joewashington75/3bab9c05920dcb487a7efa8150c301bd to your computer and use it in GitHub Desktop.
using EFCoreSeparateProject.Core.Domain;
using EFCoreSeparateProject.Infrastructure.EntityConfigurations;
using Microsoft.EntityFrameworkCore;
namespace EFCoreSeparateProject.Infrastructure
{
public class ExampleDbContext : DbContext
{
public ExampleDbContext(DbContextOptions options) : base(options)
{
}
public DbSet<Person> Persons { get; set; }
protected override void OnModelCreating(ModelBuilder builder)
{
builder.ApplyConfiguration(new PersonConfiguration());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment