public HttpResponseMessage UpdatePriceMargin(UpdateFBOPriceMarginRequest model) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } SuccessResponse response = new SuccessResponse(); FBOPriceMarginsService.UpdateFBOPriceMargin(model); return(Request.CreateResponse(response)); }
public HttpResponseMessage AddPriceMargin(AddFBOPriceMarginRequest model) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } ItemResponse <int> response = new ItemResponse <int>(); response.Item = FBOPriceMarginsService.UpdateFBOPriceMargin(model); //ItemsResponse<int> response = new ItemsResponse<int>(); //foreach (AddFBOPriceMarginRequest model in models) //{ // response.Items.Add(FBOPriceMarginsService.UpdateFBOPriceMargin(model)); //} return(Request.CreateResponse(response)); }