摘要: 在mvc4里怎样引用:System.Web.Optimization和entityframework请在nuget 里运行:Install-Package Microsoft.AspNet.Web.Optimizationinstall-package entityframework 阅读全文
posted @ 2014-11-08 10:47 smallbird2012 阅读(223) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/dingxingmei/article/details/12996665关键点:可视化建立关系操作中有一个属性 : 在创建或重新启用时检查现有数据“ 默认为“ 是” 把它设置为 否 。 就可以了 阅读全文
posted @ 2014-10-23 10:21 smallbird2012 阅读(4661) 评论(0) 推荐(0) 编辑
摘要: 问题:1.在显示的时候,报错肯定是在 与model交互的时候,没有实际访问数据库。造成的此类现象。疑问:架构时,如何使用Repository模式来进行 CRUD增删查改呢?? 阅读全文
posted @ 2014-10-22 17:24 smallbird2012 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1 public class WBIDbContext : DbContext 2 { 3 public DbSet Users { get; set; } 4 public DbSet UserGroups { get; set; } 5 ... 阅读全文
posted @ 2014-10-22 17:20 smallbird2012 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1 public class DevTypeRepository:Repository,IDevTypeRepository 2 { 3 4 //在执行子类构造函数之前,先执行基类Repository的构造函数 5 public DevTypeRepos... 阅读全文
posted @ 2014-10-22 17:16 smallbird2012 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 1 public class Repository : IRepository where T : class 2 { 3 public WBIDbContext m_Context=WBIContextFactory.GetCurrentContext();//上... 阅读全文
posted @ 2014-10-22 17:15 smallbird2012 阅读(528) 评论(0) 推荐(0) 编辑
摘要: 1 public interface IRepository where T:class 2 { 3 //增加 4 T Add(T entity); 5 //更新 6 bool Update(T entity); 7 ... 阅读全文
posted @ 2014-10-22 17:11 smallbird2012 阅读(663) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/chengxiaohui/articles/2088967.htmlhttp://zhidao.baidu.com/link?url=ep3vpzawBIfKynxi-AgNBOoUwdjopAXPMamg8nGPa4pGrxvqMzhYvpkChk3n... 阅读全文
posted @ 2014-10-22 11:33 smallbird2012 阅读(165) 评论(0) 推荐(0) 编辑
摘要: http://q.cnblogs.com/q/37952/Entity Framework - Func引起的数据库全表查询多个where条件的累积http://q.cnblogs.com/q/37087/ 阅读全文
posted @ 2014-10-22 10:42 smallbird2012 阅读(854) 评论(0) 推荐(0) 编辑
摘要: ORA-00918 阅读全文
posted @ 2014-02-27 13:28 smallbird2012 阅读(1882) 评论(0) 推荐(0) 编辑