05 2013 档案

摘要:public class JsonAttribute : ActionFilterAttribute { /// <summary> /// 兼容IE下无法接受JSON问题 /// </summary> /// <param name="filterContext"></param> public override void OnResultExecuted(ResultExecutedContext filterContext) { string contentType ... 阅读全文
posted @ 2013-05-22 13:22 三线程序员 阅读(2350) 评论(3) 推荐(2)
摘要:DbEntityEntry<T> entry = db.Entry<T>(model); if (entry.State == EntityState.Detached) db.Set<T>().Attach(model); 阅读全文
posted @ 2013-05-11 17:39 三线程序员 阅读(610) 评论(0) 推荐(0)
摘要:直接来解决办法:public partial class BaseDAL<T> where T:class{ GzItcastEntities db = new GzItcastEntities(); /// <summary> /// 新增 /// </summary> /// <param name="model"></param> /// <returns></returns> public virtual T Add(T model) { d... 阅读全文
posted @ 2013-05-05 14:15 三线程序员 阅读(455) 评论(0) 推荐(0)