I've created a new entity data model of my database and manually created the POCO objects for this to map to and it all seems to work fine.
The problem is I now want to rename the properties in my POCO objects to differ from the field names in the database e.g I want UserID rather than user_id, when I do this obviously EF then can no longer map an entity to the POCO object. Is there a way I can do this? Maybe by decorating the properties with attributes to say what maps to them?
You can change it in Entity Designer. Enity Data Model (EDM) contains 3 main parts:
POCOs are actually 'defined' in your conceptual model. Open Edmx file in Model Designer. Locate User entity there and change the name of the property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With