Skip to content

Instantly share code, notes, and snippets.

@msiddiqi
Created March 29, 2012 12:37
Show Gist options
  • Save msiddiqi/2237085 to your computer and use it in GitHub Desktop.
Save msiddiqi/2237085 to your computer and use it in GitHub Desktop.
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Department>()
.Property(d => d.DepartmentName)
.HasMaxLength(20);
modelBuilder.Configurations.Add(new StudentConfiguration());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment