摘要: 数据类型的约定配置默认规则列的数据类型是由数据库决定的,SqlServer的默认规则如下String: nvarchar(MAX)Int:intBool:bitDecimal:decimal(18,2)Byte[]:varbinary(MAX)DataAnnotation[Column(TypeName=”varchar”)]FluentmodelBuilder.Entity<Category>().Property(c=>c.Name).HasColumnType(“varchar”)数据类型的长度约定配置默认规则maxDataAnnotation[MaxLength(10 阅读全文
posted @ 2012-02-16 14:07 虎头 阅读(1129) 评论(0) 推荐(0)
摘要: 微软的示例数据库AdventureWorks下载地址http://msftdbprodsamples.codeplex.com/ 阅读全文
posted @ 2012-02-16 11:54 虎头 阅读(5955) 评论(1) 推荐(0)