Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

renaming table name entity framework code first fluent api

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
  //Changing Database table name to Metadata
  modelBuilder.Entity<Metadata>().ToTable("Metadata");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #renaming #table #entity #framework #code #fluent #api
ADD COMMENT
Topic
Name
5+9 =