【发布时间】:2012-03-25 02:49:27
【问题描述】:
使用 EF 4.x DbContext Generator 模板时,会创建以下文件结构:
- Model1.Context.tt
- Model1.Context.cs
- 型号1.tt
- Model1.cs
- [实体].cs
- ...
Model1.tt 生成实体类,如Building an MVC 3 App with Database First and Entity Framework 4.1 中所述。但是Model1.cs 的目的是什么?它没有有意义的内容:
//------------------------------------------------------------------------------
// <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;
【问题讨论】:
标签: entity-framework code-generation t4