摘要: 首先将windows service发布到web的bin目录 public class HomeController : Controller { string sName = "MyService1"; public ActionResult In... 阅读全文
posted @ 2015-11-03 14:12 nbu_djw 阅读(265) 评论(0) 推荐(0) 编辑
摘要: public class MyAuthorizeAttribute : System.Web.Mvc.AuthorizeAttribute { public new string[] Roles { get; set; } protected override bo... 阅读全文
posted @ 2015-10-21 10:03 nbu_djw 阅读(327) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/stevenhqq/archive/2013/04/18/3028350.html解决方案多项目情况下的数据迁移,需要写完整路径名。PM> Enable-Migrations -ContextTypeName "解决方案.项目.Model.EntityC... 阅读全文
posted @ 2015-09-25 10:15 nbu_djw 阅读(323) 评论(1) 推荐(0) 编辑
摘要: 添加一个带有使用窗体身份验证的帐户控制器的默认 ASP.NET MVC 4 项目,如果用codefirst会自动生成几张表。 public class EntityContext : DbContext { public EntityContext() ... 阅读全文
posted @ 2015-09-17 15:27 nbu_djw 阅读(600) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Transactions;namespace 事务{... 阅读全文
posted @ 2015-08-10 17:25 nbu_djw 阅读(437) 评论(2) 推荐(0) 编辑
摘要: //表单异步提交function formPost(form, url) { $('#' + form).form('submit', { url: url, onSubmit: function () { return $(this).for... 阅读全文
posted @ 2015-08-07 16:15 nbu_djw 阅读(349) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/23347093/dbcontext-generator-t4-templates-with-code-firstdbfist使用t4模板edmx文件codefirst没有edmx文件,只有dbcontext类文件,稍微有点不一样... 阅读全文
posted @ 2015-08-05 16:18 nbu_djw 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 参考http://www.cnblogs.com/han1982/p/4177850.htmlhttp://blog.csdn.net/fax5201314/article/details/8777298http://www.tuicool.com/articles/zI7Rzy ... 阅读全文
posted @ 2015-07-27 17:05 nbu_djw 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 参考文档http://www.cnblogs.com/zhangchenliang/archive/2013/01/08/2850970.htmlhttp://www.tuicool.com/articles/yiUzQjIUnityContainer container = new UnityCo... 阅读全文
posted @ 2015-07-27 15:46 nbu_djw 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 下载http://t4-editor.tangible-engineering.com/Download_T4Editor_Plus_ModelingTools.html添加新建项Simple T4 Template,生成IBLL,注意不是添加运行时文本模板 using System;using ... 阅读全文
posted @ 2015-07-24 13:20 nbu_djw 阅读(250) 评论(0) 推荐(0) 编辑