摘要:
Unity是微软模式与实践团队开发的一个轻量级、可扩展的依赖注入容器。下面我结合一个简单的MVC项目实现Unity的配置和使用。 1. 首先我们创建一个MVC4的解决方案,并创建如下的项目 IBaseData是接口项目,包含了一个接口类,以及Model(数据访问使用EF) 接口中定义了一些方法 如下 阅读全文
摘要:
html中向下滑动页面,按钮出现,可以回到顶部,回到顶部后按钮自动消失。 阅读全文
摘要:
以示例数据库NorthWind为例 在sql窗口中执行一下语句 EXEC sp_attach_db @dbname = 'NorthWind', @filename1 = 'C:\Users\hupengyang\Desktop\northwnd\northwnd.mdf', --mdf文件路径 @ 阅读全文
摘要:
.NET Memcached分布式缓存帮助类 1 using Memcached.ClientLibrary; 2 using System; 3 using System.Collections; 4 using System.Collections.Generic; 5 using System 阅读全文
摘要:
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Xml.Linq; 6 using System.Text.RegularExpr 阅读全文
摘要:
AES加密解密帮助类 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Security.Cryptography; 6 using 阅读全文
摘要:
MD5加密帮助类 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using System.Security.Cryptography; 5 6 namespace Components.Helpe 阅读全文
摘要:
1 using System; 2 using System.Collections.Generic; 3 using System.Web; 4 using System.Net; 5 using System.IO; 6 using System.Text; 7 using System.Con 阅读全文
摘要:
微信jssdk 认证签名,微信官方建议在后台获取,并且要缓存获取过程中使用的access_token 和 jsapiticket,原因是微信官方限制了每天获取的次数(2000次),所以要在后台缓存, access_token 和 jsapiticket都是两小时内有效,可根据自己的需求设定缓存的时间 阅读全文
摘要:
枚举用于选择下拉框 1 /// <summary> 2 /// 将枚举绑定到下拉框 3 /// </summary> 4 /// <typeparam name="T"></typeparam> 5 /// <param name="p_Value">选中值</param> 6 /// <param 阅读全文