随笔分类 - Entity Framework
Entity Framework6
摘要:SQL:SELECT [t0].[ProductName], [t1].[TotalPrice] AS [TotalPrice]FROM [Product] AS [t0]LEFT OUTER JOIN [OrderDetail] AS [t1] ON [t0].[ProductID] = [t1]...
阅读全文
摘要:The specified LINQ expression contains references to queries that are associated with different cont。解决方法:查询源的最后添加.ToList();一定是哪里转换成了IEnumerable或其他东东了...
阅读全文
摘要:在EF中,我们建立数据模型的时候,可以给属性配置数据生成选项DatabaseGenerated,它后有三个枚举值:Identity、None和Computed。Identity:自增长None:不处理Computed:表示这一列是计算列。在EF中,如果主键是int类型,Code First生成数据库...
阅读全文

浙公网安备 33010602011771号