public void Update(SquadEventUpdateRequest model) { DataProvider.ExecuteNonQuery(GetConnection, "dbo.SquadEvent_Update", inputParamMapper : delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@Id", model.Id); MapCommonParameters(model, paramCollection); } ); return; }
public HttpResponseMessage Update(SquadEventUpdateRequest model) { if (!ModelState.IsValid) { Request.CreateResponse(HttpStatusCode.BadRequest, ModelState); } _squadEventService.Update(model); _notificationService.SquadEvent(model.Id, Enums.EventActionType.Modified); SuccessResponse response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, response)); }