protected JsonResult Update <T>(IOrmModel item) { int?Pk = item.PrimaryKey().Value; if (Pk != null && Pk > 0) { item.Update(); } else { item.Create(); } return(Json(item, JsonRequestBehavior.AllowGet)); }
protected void Post <T>(IOrmModel model) where T : IOrmModel, new() { model.Create(); }