Пример #1
0
 public IHttpActionResult PostQuotation(int id, [FromBody] Quotation quotation)
 {
     try
     {
         QuotationManager manager = new QuotationManager();
         quotation.specialist.id = id;
         Quotation result = manager.Insertar(quotation);
         if (result != null)
         {
             return(Created(new Uri(Url.Link(ViewRouteName, new { id = result.specialist.id })), result));
         }
         else
         {
             return(BadRequest());
         }
     }
     catch (Exception e)
     {
         return(NotFound());
     }
 }