public void Update(InvoiceUpdateRequest model) { DataProvider.ExecuteNonQuery(GetConnection, "dbo.Invoice_Update", inputParamMapper : delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@Id", model.Id); MapCommonParameters(model, paramCollection); } ); return; }
public HttpResponseMessage Update(InvoiceUpdateRequest model) { if (!ModelState.IsValid) { return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState)); } _invoice.Update(model); SuccessResponse response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public InvoiceUpdateResponse InvoiceUpdate(InvoiceUpdateRequest request) { return(Execute <InvoiceUpdateRequest, InvoiceUpdateResponse>( request, response => response.Invoice = MealMenuOrderFacade.InvoiceUpdate(request.Invoice, request.UserId))); }