Format:
Recent snippets matching tags of sqlDataReader
public static IList<T> ToList<T>(this System.Data.SqlClient.SqlDataReader dr) where T : new() { Type type = typeof(T); if(System.Web.HttpContext.Current.Cache[type.Name + "_properties"] == null) { System.Web.HttpContext.Current.Cache.Insert(type.Name + "_properties", type.GetProperties().ToList()); } IList<PropertyInfo> properties = (IList<PropertyInfo>)System.Web.HttpContext.Current.Cache[type.Name + "_properties"]; IList<T> result = new List<T>(); while(dr.Read())
174 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
