随笔分类 -  Entityframwork

摘要:Ef 使用类似sqlserver 的nolock 查询扩展类 参考:http://stackoverflow.com/questions/926656/entity-framework-with-nolock 阅读全文
posted @ 2017-03-22 09:12 碎碎虎 阅读(1634) 评论(0) 推荐(0)
摘要:public List<CustomerType> GetCustomerTypesBySchemaTypeCode(int schemaTypeCode) { var query = (from a in _reportTypeRepository.TableNoTracking.Where(v 阅读全文
posted @ 2015-12-22 16:51 碎碎虎 阅读(1426) 评论(1) 推荐(0)
摘要:当通过task 插入多条数据时报错。 DBcontext 不是线程安全的, 如果是WebAPI 为每个请求创建DbContext 部分解释: http://stackoverflow.com/questions/28106267/insert-into-dbcontext-multithreadin 阅读全文
posted @ 2015-08-11 09:17 碎碎虎 阅读(1091) 评论(0) 推荐(0)