Created
March 25, 2020 20:40
-
-
Save joewashington75/3bab9c05920dcb487a7efa8150c301bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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