예제 #1
0
 public async Task <IActionResult> GetPricesByCustomer(Price prices)
 {
     try
     {
         return(Ok(await context.GetPricesByCustomer(prices)));
     }
     catch (Exception ex)
     {
         return(BadRequest(new ErrorMessage(ex.Message)));
     }
 }
예제 #2
0
 public async Task <IHttpActionResult> GetPricesByCustomer(Prices prices)
 {
     try
     {
         //   var str = await Request.Content.ReadAsStringAsync();
         // var price = JsonConvert.DeserializeObject<Prices>(str);
         return(Ok(await context.GetPricesByCustomer(prices)));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.NotFound, ex.Message));
     }
 }