Darren F Reed
Darren F Reed

Reputation: 21

mvc entity framework database first wizard edmx file

In visual 2013 I create a database first entity framework model using the wizard and see the corresponding edmx files in my solution explorer. Lets call it DataModel.edmx. Lets say I have 2 table "orders" and "customers" under the DataModel.tt section the wizard created class files for each table which makes sense but it also created an additional empty file called "DataModel.cs". why and what is it used for?

Upvotes: 2

Views: 59

Answers (1)

Carl Prothman
Carl Prothman

Reputation: 1541

The Entity Data Model wizard creates a cs file which is the same name as the data model, but with a CS file extension.

If I look at my file, its empty with the following comment:

//------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated from a template.
//
//    Manual changes to this file may cause unexpected behavior in your application.
//    Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

I would not worry about this file since its hidden under the EDMX file. ;)

Upvotes: 1

Related Questions