摘要: Dapper是一款轻量级ORM工具(Github)。如果你在小的项目中,使用Entity Framework、NHibernate 来处理大数据访问及关系映射,未免有点杀鸡用牛刀。你又觉得ORM省时省力,这时Dapper 将是你不二的选择。 1、为什么选择Dapper 2、以Dapper(4.0)为 阅读全文
posted @ 2017-06-26 14:23 Alwayswantmore 阅读(274) 评论(0) 推荐(0)
摘要: SELECT 表名 = CASE WHEN a.colorder=1 THEN d.name ELSE '' END,表说明 = CASE WHEN a.colorder=1 THEN ISNULL(f.value,'') ELSE '' END,字段序号 = a.colorder,字段名 = a. 阅读全文
posted @ 2017-06-15 18:41 Alwayswantmore 阅读(237) 评论(0) 推荐(0)
摘要: // 导出数据到Excel /// <param name="dataList"></param> /// <param name="fields"></param> /// <param name="headTexts"></param> /// <param name="title"></par 阅读全文
posted @ 2017-06-05 17:33 Alwayswantmore 阅读(94) 评论(0) 推荐(0)
摘要: // 推送到IOS平台 /// <param name="registeration_id">注册的设备ID</param> /// <param name="content">推送的内容</param> private bool SendPushToIos(string registeration 阅读全文
posted @ 2017-06-05 17:31 Alwayswantmore 阅读(234) 评论(0) 推荐(0)
摘要: // 对象转JSON /// <param name="obj">对象</param> public static string ObjectToJSON(object obj) { JavaScriptSerializer jss = new JavaScriptSerializer(); try 阅读全文
posted @ 2017-06-05 17:25 Alwayswantmore 阅读(114) 评论(0) 推荐(0)
摘要: public static bool IsNumeric(string expression) { if (expression != null) { string str = expression; if (str.Length > 0 && str.Length <= 11 && Regex.I 阅读全文
posted @ 2017-06-05 17:11 Alwayswantmore 阅读(140) 评论(0) 推荐(0)
摘要: // 追加节点 /// <param name="filePath">XML文档绝对路径</param> /// <param name="xPath">范例: @"Skill/First/SkillItem"</param> /// <param name="xmlNode">XmlNode节点< 阅读全文
posted @ 2017-06-05 16:40 Alwayswantmore 阅读(121) 评论(0) 推荐(0)
摘要: //发送电子邮件 // <param name="smtpserver">SMTP服务器</param> // <param name="enablessl">是否启用SSL加密</param> // <param name="userName">登录帐号</param> // <param nam 阅读全文
posted @ 2017-06-05 16:20 Alwayswantmore 阅读(138) 评论(0) 推荐(0)
摘要: // HTTP POST方式请求数据 public static string HttpPost(string url, string param) { HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); requ 阅读全文
posted @ 2017-06-05 16:15 Alwayswantmore 阅读(182) 评论(0) 推荐(0)
摘要: // DES加密数据 public static string Encrypt(string Text) { return Encrypt(Text, "Michael"); } public static string Encrypt(string encryptText, string encr 阅读全文
posted @ 2017-06-05 16:12 Alwayswantmore 阅读(225) 评论(0) 推荐(0)