I have started a very simple ASP.Net MVC4 applictaion with a Database first approach (with existing DB). I have generated .edmx
using ADO.Net Entity Data Model template. The process has created a xxxxxxx.Designer.cs
file under xxxxxxx.edmx
option. However, the .cs file is empty with the following message.
// Default code generation is disabled for model 'C:\Visual Studio 2010\Projects\xxx\DProject\Models\BIReportDataModel.edmx'.
// To enable default code generation, change the value of the 'Code Generation Strategy' designer
// property to an alternate value. This property is available in the Properties Window when the model is
// open in the designer.
Following the message I have changed the properties which generated code in the xxxxxxx.Designer.cs
file.
Question:
- Is this the correct thing to do? What is the purpose of this file?
- Do I also need to generate Strongly-typed DBContext classes from the .edmx designer page by right clicking "add code generation item" and then selecting EF DBContext Generator?
What exactly is the process for Database first approach?
I have seen lots of post/blogs/tutorials and all seems to be very confusing and mostly for CodeFirst approach.