Tag: data annotations

如何指定一个属性应该生成一个TEXT列而不是nvarchar(4000)

我正在使用entity framework的代码优先function,我想弄清楚如何指定自动生成数据库时应该创build的列数据types。 我有一个简单的模型: public class Article { public int ArticleID { get; set; } public string Title { get; set; } public string Author { get; set; } public string Summary { get; set; } public string SummaryHtml { get; set; } public string Body { get; set; } public string BodyHtml { get; set; […]