I've just started to implement EF CTP 5 in to a new project. In this case all my database fields are named differently to my POCO properties due to an obscure database naming convention. Am I right in thinking the best way to map this is to override OnModelCreating and have code like this
modelBuilder.Entity<Sale>().Property(s => s.ID).HasColumnName("sale_id");
modelBuilder.Entity<Sale>().Property(s => s.ProductName).HasColumnName("product_name");
modelBuilder.Entity<Sale>().Property(s => s.ProductPrice).HasColumnName("product_price");
modelBuilder.Entity<Sale>().Property(s => s.SaleDate).HasColumnName("sale_date");
This is going to end up very large very quick, is it really the best way to do this?