ASP.NET
锤子馆长
这个作者很懒,什么都没留下…
展开
-
Redis 使用Lua脚本删除指定前缀的Key
local cursor = 0 local keyNum = 0 repeat local res = redis.call('scan',cursor,'MATCH',KEYS[1],'COUNT',ARGV[1]) if(res ~= nil and #res>=0) then cursor = tonumber(res[1]) loc...原创 2020-03-13 15:57:19 · 1677 阅读 · 2 评论 -
FormsAuthentication的用户、角色身份认证
在Web.config里面system.web节点下加入以下代码 设置Cookie名称 以及过期的时间 <authentication mode="Forms"> <forms name="Project.AUTH" protection="All" timeout="43200" path="/" requireSSL="false&qu原创 2018-11-15 18:10:13 · 400 阅读 · 0 评论 -
对DataSet,DataRow,DateTable转换成相应的模型
/// <summary> /// DataRow 转成 模型 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="dr"></param>转载 2018-04-04 11:45:20 · 965 阅读 · 0 评论 -
Datatable转换成List
sing System; using System.Collections.Generic; using System.Text; using System.Data; using System.Reflection; namespace NCL.Data { /// /// 实体转换辅助类 ///转载 2016-07-19 10:25:20 · 380 阅读 · 0 评论 -
获取存储过程输出参数
获取存储过程输出参数原创 2016-06-30 21:11:31 · 416 阅读 · 0 评论 -
事务使用方式
ASP.NET使用事务原创 2016-06-30 21:05:34 · 340 阅读 · 0 评论 -
获取平台信息
public static bool CheckAgent() { bool flag = false; string agent = System.Web.HttpContext.Current.Request.UserAgent; string[] keywords = { "Androi...原创 2016-06-30 21:00:36 · 331 阅读 · 0 评论 -
Linq基本语法
public Product Get(int id) { var _Product = _db.Product.FirstOrDefault(p => p.PID.Equals(id)); return _Product; } public int Insert(Product _P...转载 2016-06-30 20:56:55 · 287 阅读 · 0 评论 -
ASP.NET记录错误日志
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.IO; using System.Text; using Newtonsoft.Json.Linq; using Newtonsoft.Json; namespace ERPSite.Universal原创 2016-07-22 15:42:32 · 331 阅读 · 0 评论