public override void Updates(BenchmarksContainer bc) { bc.Add(d => { _db.Update(new { title = "Updated" }, 5); }, "massive"); }
public OperationResult <int> UpdateContact(Contact contact) { var result = new OperationResult <int>(); result.Data = table.Update(contact, contact.Id); return(result); }
public ActionResult Edit() { var model = SqueezeJson(); _productions.Update(model, model.ID); return(VidpubJSON(model)); }
protected override void Update(GameTime gameTime) { cat.Update(gameTime); PluginManager.Update(gameTime); base.Update(gameTime); }
public ActionResult Update(int id, FormCollection formCollection) { var model = tbl.CreateFrom(formCollection); try { tbl.Update(model, id); } catch (Exception x) { TempData["Error"] = "There was a problem editing this record"; } return(null); }
public static dynamic Process(DataProcessRequest request) { dynamic result = null; var tbl = new DynamicModel(ConnectionString, tableName: request.EntityType.Name, primaryKeyField: "Id"); switch (request.Type) { case RequestType.GET: if (request.Object != null) { throw new NotImplementedException(); //result = tbl. } else { result = tbl.All(); } break; case RequestType.POST: // Id is not allowed when doing an insert as this is the auto generated key as IDENTITY(1,1) IDictionary <string, object> map = ObjectExtensions.ToDictionary(request.Object); map.Remove("Id"); result = tbl.Insert(map); break; case RequestType.UPDATE: result = tbl.Update(request.Object); break; case RequestType.PUT: throw new NotImplementedException(); break; case RequestType.DELETE: throw new NotImplementedException(); break; default: break; } return(result); }