Created
October 30, 2013 19:00
-
-
Save mmilleruva/7238133 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
public partial class ToyContext : DbContext | |
{ | |
static ToyContext() | |
{ | |
Database.SetInitializer(null); | |
{ | |
public ToyContext() | |
: base("Name=ToyContext"){} | |
public DbSet Orders { get; set; } | |
public DbSet Person { get; set; } | |
public DbSet Preferences { get; set; } | |
protected override void OnModelCreating(DbModelBuilder modelBuilder) | |
{ | |
modelBuilder.Configurations.Add(new OrderMap()); | |
modelBuilder.Configurations.Add(new PersonMap()); | |
modelBuilder.Configurations.Add(new PreferenceMap()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment