I know that I can create the POCO files from .edmx, but this only give’s you a part of the code, because if you are going to use code first approach you need to provide more info to the POCO clases for example the key and foreign key by annotations or mapping, Now I was wondering , if exit’s some way about how can I created this POCO classes with the annotations from a existing database.
Share
what you are describing is not code first, is database first!
here is the answer you need to check: Entity Framework 4.1 – Code First with existing Database, how to define classes, using Attributes or EntityTypeConfiguration? What is the difference?