摘要:1、在http://mirrors.sohu.com/mysql/MySQL-for-VisualStudio/ 下载安装 mysql-for-visualstudio-1.2.3.msi 。这样,才会有 MySQL 的数据源。2、安装用于 .net 的连接程序mysql-connector-net...
阅读全文
摘要:结论:EF的缓存使对实体店修改,不管savechanges()没有,下次取同样的实体都是修改过的。 tbLog log = new tbLog(); log.Operator_name = "test"; //1会员,2服务中心,3管...
阅读全文
摘要:最近考虑到并发的问题,用 EF 处理并发非常麻烦, 直接用原生SQL简单:Database.ExecuteSqlCommand:不用返回结果,比如Update等等,Database.SqlQuery:返回结果,比如查询例:db.Database.ExecuteSqlCommand("update t...
阅读全文
摘要:在 Startup.cs 中写入即可usingHangfire;usingHangfire.SqlServer;usingMicrosoft.Owin;usingOwin;usingSystem; [assembly:OwinStartupAttribute(typeof(AnLiWang.Star...
阅读全文
摘要:见图然后在选择框中选对应的项目即可详见:http://www.cnblogs.com/tiasys/p/3776890.html
阅读全文
摘要:检测常见ASP.NET配置安全漏洞.NET Framework 4.0-RequestValidationMode
阅读全文
摘要:在项目中,对于相似的操作,要抽象出一个方法,比如充值:充值现金、充值积分、充值电子币,这时可以用Object传入参数,用.GetType().Name获得参数到底是什么类型。代码 public static bool RechargeServiceCenter(ServiceCente...
阅读全文
摘要:Code First 的使用:http://www.cnblogs.com/sword-successful/archive/2012/12/31/2840391.html(写的很明白),http://www.cnblogs.com/ljp-sun/p/4418270.html,http://www...
阅读全文
摘要:var a = Request.Url.ToString(); 全链接:Http://localhost:23457/MemberIndo/Indexvar b = Request.Url.Authority; 域 名:Http://localhost:23457var c =...
阅读全文