Hi,
>> When we work with EF code first with existing db then we have to write c# class which represent db table.
I do not fully understand what you are describing.
According to your description,you do not seem to use EF's "DataBase First or
Code First to an Existing Database", but rather more like
a traditional "ado.net" which not use entity framework.
Entity Frameworkis a
ORM
Framework,If use "Code First From Database"?
Entity Framework Tools for Visual Studio would to help us generate some initial code to map to the database.
Off couse ,these tools are just generating code that you could also type by hand if you prefer.
Entity Framework Code First to an Existing Database
Form your description, I strongly suggest you take a look at this article
Entity Framework Code First Conventions
Sincerely,
Bob
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.