自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 收藏
  • 关注

转载 IBatis 批量插入数据

sql语句 <!--批量插入待收流水--> <insert id="BatchInsertOrder" parameterClass="ArrayList"> INSERT INTO [Order] ([OrdreNo] ,[ClientId] ,[ClientName] ,[ClientPhone...

2016-05-31 16:59:00 137

转载 IBatis 构建 In语句

语句<select id="qryProjectsByIds" parameterClass="Hashtable" resultMap="projectTypeField" > select * from Project with(nolock) where PrjId in <iterate proper...

2016-05-31 15:49:00 81

转载 IBatis一对多查询

public class User { public int UserId { get; set; } public string UserName { get; set; } } public class UserRight { public int User...

2016-05-27 19:21:00 112

转载 MVC Autofac构造函数注入

建立 空的 MVC4项目首先引用 NuGet 里 autofac 和 autofac .integration. mvc然后 建立Modelpublic class Person{public int Id { get; set; }public string Name { get; set; }public int Age { get; set; }pu...

2016-05-19 17:24:00 132

转载 泛型妥托优化反射

public class Order { public string OrderId { get; set; } } public class SetterWrapper<TTarget, TValue> { private Action<TTarget, TValue> _setter; ...

2016-05-18 11:54:00 59

转载 c#优化

优化反射http://kb.cnblogs.com/page/172119/http://www.2cto.com/kf/201301/182765.htmlhttp://blog.sina.com.cn/s/blog_94804b4a0100ykpw.htmlhttp://www.infoq.com/cn/articles/C-sharp-performance-opti...

2016-05-17 00:03:00 93

转载 MSMQ 学习(1)

在 Windows Server 2008 or Windows Server 2008 R2 上安装消息队列 4.0在服务器管理器中,单击“功能”。在“功能摘要”下的右窗格中,单击“添加功能”。在生成的窗口中,展开“消息队列”。展开“消息队列服务”。单击“目录服务集成”(用于加入域的计算...

2016-05-16 10:59:00 98

转载 泛型单例

/// <summary> /// 创建单例对象 /// </summary> /// <typeparam name="T"></typeparam> public sealed class Singleton<T> where T : new() { /// <summar...

2016-05-16 10:00:00 68

转载 IBatis学习

(1)建立SqlMap.config文件<?xml version="1.0" encoding="utf-8" ?> <sqlMapConfig xmlns="http://ibatis.apache.org/dataMapper" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">...

2016-05-13 19:34:00 37

转载 项目解决方案成熟配置

代码管理用 TortoiseGit单元测试用 xunit,TestDrive.Net项目管理用 JiraORM用 Ibatis类的映射用 AutoMap,TinyMap(速度更快)IoC用Autofac缓存用Redis文档管理用Wiki日志用 log4net,CommonLogDll管理用 Nuget自动化构建 用Jenkinshttp://b...

2016-05-13 15:29:00 125

转载 static 类也可以有static构造函数

public static class A{static A(){}}static构造函数不能是public,也不可能被主动调用,所以public没有意义转载于:https://www.cnblogs.com/zhshlimi/p/5488328.html

2016-05-13 09:48:00 95

转载 C#实现自动升级(附源码)

http://blog.csdn.net/zhuweisky/article/details/50439386OAUS转载于:https://www.cnblogs.com/zhshlimi/p/5486697.html

2016-05-12 17:53:00 174

转载 .Net源码

http://referencesource.microsoft.com/转载于:https://www.cnblogs.com/zhshlimi/p/5486087.html

2016-05-12 16:12:00 77

转载 (原创)模板字符串(短信,邮件..) 与 类实例 匹配替换的简单解决方案

public classTemplateTransferConfig { public Type ClassType { get; set; } /// <summary> /// 如果ClassType不为空,则该字段代表字段名.如果为空,则为变量占位符 /// </summary> ...

2016-05-12 15:36:00 124

转载 C# Dictionary 的几种遍历方法

网上看到的,记录下来,供参考,备忘Dictionary<string,int> list =newDictionary<string,int>(); list.Add("d", 1);//3.0以上版本foreach(variteminlist)...

2016-05-12 14:38:00 49

转载 yield return 和 yield break

//yield return返回类型必须为IEnumerable、IEnumerable<T>、IEnumerator或IEnumerator<T>。 static IEnumerator<int> yieldTest() //yield return 返回IEnumerator { yield ret...

2016-05-10 22:39:00 99

转载 git 提交时保存 帐号密码

在相应的文件夹上右键Tortiusegit->settings->gig 点击 第1个按钮 Edit local .git/config 在打开的文档里url = http://xx.com/sss.git里面修改如下 url=http://account:password@xx.com/sss.git保存即可转载于:https://www.c...

2016-05-10 18:36:00 67

转载 xml 嵌入式资源

使用Ibatis总是说未能加载相应的sqlmap.xml,原来是 xml以内容方式,而不是嵌入式方式载入Dll中转载于:https://www.cnblogs.com/zhshlimi/p/5478703.html

2016-05-10 17:47:00 113

转载 获取当前程序集和所有程序集

var assemArr = AppDomain.CurrentDomain.GetAssemblies(); var assem = Assembly.GetExecutingAssembly() ;转载于:https://www.cnblogs.com/zhshlimi/p/5474081.html

2016-05-09 15:27:00 432

转载 autofac 初步学习

//数据处理接口public interface IDal<T> where T : class { void Insert (T model); void Update(T model); void Delete(T model); T Select(Int32 id); }//Ms...

2016-05-09 14:43:00 75

转载 枚举所有继承特定接口的类

使用 Linq:var types = AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(ISecurity)))).ToArray();不使用 Linq:public static IEnumera...

2016-05-09 11:06:00 79

转载 Stream Byte[] 转换

public byte[] StreamToBytes(Stream stream){ byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); stream.Seek(0, SeekOrigin.Begin); return bytes;}...

2016-05-09 10:55:00 79

转载 async await

顺序执行class Program { static void Main(string[] args) { new MyClass(); Console.Read(); } } public class MyClass { public MyClass() ...

2016-05-06 15:38:00 52

转载 C# ServiceStack.Redis 操作对象List

class Car { public Int32 Id { get; set; } public String Name { get; set; } static void Main(string[] args) { RedisClient client = ne...

2016-05-05 17:44:00 276

转载 resharper安装后,一不小心点错了(选择了object browser)

打开Resharper,选择Options,然后选择Tools中的External Sources,你的情况是选择了Navigation to Object Brower这一项了,换成第一个Default Visual Studio navigation就好了转载于:https://www.cnblogs.com/zhshlimi/p/5461908.html...

2016-05-05 14:59:00 325

转载 fiddler 挂载 JS文件

有时候,网站 JS 有问题,或者我们想调试JS,就修改了JS,,然后希望它在本地能与网站一起运行,就需要用到 挂载JS了转载于:https://www.cnblogs.com/zhshlimi/p/5460806.html...

2016-05-05 10:13:00 112

转载 2层Xml读取类

配置文件<?xml><root><parent name="C"><child name="C1">Spring</child><child name="C2">Summer</child></parent><parent name="D"><...

2016-05-04 09:48:00 68

转载 Request.InputStream 接收Post Data

今天 用 Request.Form /Request.Params 等怎么也获取不到客户发过来的Post 数据后来试着用了Request.InputStream 竟然可以 using (System.IO.StreamReader sr = new System.IO.StreamReader(Request.InputStream)) ...

2016-05-03 14:12:00 135

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除