Reputation: 24063
I am using the entity framework.
Can I use my own entities instead of the POCO entities?
Can I use any entities, or there is any restriction about the entity names and members?
How can I map between the db field to the entity's member itself if the entity's member doesn't have the same name as the field?
UPDATE
I already have the database ad a large project with no data access layer at all.
I decided to add data access layer and get rid of my all stored procedures.
Right now I am facing the problem of how to get the data from the db in order to do select, insert and delete. I managed to understand how to use POCO objects, but I get trouble in converting the poco elements into my business entities. So I am wondering if I can use my own entities instead of the POCOs in order to communicate the db.
Upvotes: 2
Views: 199
Reputation: 364279
Simply said, if you already have a large project and database as well, how is it possible that you didn't develop any data access layer yet? Sounds like you did a lot of coding and now you have totally unworking application because whole layer is missing.
I have to say that you will have really hard times to use EF in such situation because EF often directs the development its way. For example no support for unique keys, hard support of enums (through the hacks) and not everything can be mapped as you expect.
You should probably check a framework with more powerful mapping features - NHibernate.
Upvotes: 2