Let’s say that hypothetically I have a table called Products with a primary key called ProductID. Is it possible to have my entity class (using Entity Framework 4 Code First) have a property called ID instead of ProductID?
Let’s say that hypothetically I have a table called Products with a primary key
Share
Sure. Just edit the name of the property in the designer.
UPDATE:
This is also supported in Code First. See here: http://weblogs.asp.net/scottgu/archive/2010/07/23/entity-framework-4-code-first-custom-database-schema-mapping.aspx