Question: Background
----------

* Visual Studio 2012
* NEW Model.EDMX file created in VS2012
* Copied some of the EDMX xml from a previously created EDMX into the new one

Problem / Question
------------------

Now. The EDMX (TT transform, custom tool, whatever, etc.) is generating BOTH DbContext classes (under the Model.tt/Model.Context.tt files) *and* ObjectContext classes (via the Model.designer.cs file). See image below:

![Both the Model.tt AND the Designer.cs files are defining my entities](https://i.stack.imgur.com/lr7gH.png)

Everything builds fine and works with the DbContext (but obviously only if I delete the Designer.cs file just before building) but the Designer.cs - and its ObjectContext-based code - keeps reappearing. How do I stop this behavior?!

Answer: 
I didn't find out how to stop the Designer.cs file from generating the ObjectContext, but I did figure out how to make it so that it doesn't matter. Just set the Build Action to "None" instead of "Compile".

![Set the Build Action to None](https://i.stack.imgur.com/8FqED.png)
On normal EF Code First projects, Code Generation Strategy is "None" and ObjectContext is not generated. 

It appears in your case that you Code Generation Strategy set to "Default".

To stop generating ObjectContext in `xxxx.Designer.cs`, go to your edmx file, and change your Code Generation Strategy from "Default" to "None".

If you inspect `xxxx.Designer.cs`

```
// Default code generation is disabled for model 'C:\Users\xyxy\xyxyxy.Web\Models\xyxy.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.

```