Code First is technically BOTH first a database, not a database (it is flexible). You just create POCO (plain old C # objects). These classes will display the structure of the database table schema the way you want, regardless of whether the database exists or not. If you do not know what you are doing, then you probably do not want to do this.
Earlier in EDMX, it was planned to populate the constructor, but in VS 2012 and above, tt files are used by default. You should use the tt editor from nuget to really benefit from them.
OR I suggest you do the following
1. Open the EDMX file - double click 2. Right Click in the EDMX diagram and click on Properties 3. In the properties window change the "Code Generation Strategy" from None to Default 4. Delte the tt files as you don't want both entities / contexts in project.
Tom stickel
source share