我在项目中使用EF 4和POCO。目前,我手动创建波苏斯,我需要使用此格式/布局:实体框架4 - POCO - T4模板
public class Blog
{
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public virtual IList<BlogPost> BlogPosts { get; private set; }
}
public class BlogPost
{
public int Id { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public DateTime? PublishedOn { get; set; }
public virtual Blog Blog { get; set; }
}
这些波苏斯是基于我的数据库中的表(博客和相关博客文章)。
是否有任何T4模板可以下载使用上面的格式/布局自动创建您的POCO对象?还是我必须创建我自己的T4模板?
您是否看到我的下方答案? – RPM1984 2010-11-10 23:32:03