随笔分类 -  EntityFramework

EntityFramework
摘要:error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registe... 阅读全文
posted @ 2014-10-05 22:29 虎头 阅读(6479) 评论(1) 推荐(2)
摘要:数据类型的约定配置默认规则列的数据类型是由数据库决定的,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 虎头 阅读(1131) 评论(0) 推荐(0)