Last post Feb 21, 2017 08:56 PM by Mikesdotnetting
Feb 21, 2017 02:16 AM|PraveenAmar|LINK
I am new to Entity Framework & trying to maintain a project that is built using EF v6.1.3. I am trying to do Data model refresh but unfortunately i can't seem to find any edmx file under my solution.
P.S:Entity Framework is already installed
Feb 21, 2017 08:56 AM|Mikesdotnetting|LINK
Are you certain that the project is a Database-first project and not a Code-first project?
Feb 21, 2017 03:14 PM|PraveenAmar|LINK
I think you may be right, it could be Code first project. I thought since Database already exist he might have used Database first project but since there were no proper constraints on tables he might have used Code first. How do i confirm if its Code first
or DB first approach??
He also tried to enter keys manually
[Key, Column(Order =1)]
Feb 21, 2017 08:56 PM|Mikesdotnetting|LINK
The lack of an edmx file strongly suggests that it is code first, as do the schema annotations on the entities. You can do Code First to an existing database - even to a badly designed one.