Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7614605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:26:46+00:00 2026-05-31T02:26:46+00:00

When using the EF 4.x DbContext Generator template, the following file structure is created:

  • 0

When using the EF 4.x DbContext Generator template, the following file structure is created:

  • Model1.Context.tt
    • Model1.Context.cs
  • Model1.tt
    • Model1.cs
    • [entity].cs
    • …

Model1.tt generates the entity classes, as described on Building an MVC 3 App with Database First and Entity Framework 4.1. But what is the purpose of Model1.cs? It has no meaningful content:

//------------------------------------------------------------------------------
// <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>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:26:48+00:00Added an answer on May 31, 2026 at 2:26 am

    In case of old POCO T4 template this file was used for some shared code like FixupCollection. In DbContext T4 template it probably doesn’t have real meaning but the default custom tool used to generate file from T4 template somehow expects that this file will be created (all other files our hacked in).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a model in the edm designer (VS10) using DbContext Entity Generator as
I am building an ASP.NET MVC web application using entity framework DbContext using the
I created my model using Db Context Generator, using EF 4. My model is
I'm using EntityFramework v4.3.1 and building my model via code by inheriting from DbContext
The goal: I'm trying to use the new Entity Framework 4.1 DbContext API (using
I am using DBContext and have two classes whose properties are all virtual. I
I'm using the DbContext and Code First APIs introduced with Entity Framework 4.1. The
Set up: New MVC 3 project, using existing database. Created an EF file (edmx),
I am using EF4.1, have upgraded my project, generated POCO classes to use DbContext
I am using EF 4.1 and SQL server 2008 with the ADO.net DBContext generator

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.