public IActionResult Update([FromBody, SwaggerRequestBody("Form to update a Bill", Required = true)] BillUpdate form) { try { BillGet bill = _service.Update(form.ToServiceLayers()).ToApi(); return(Ok(bill)); } catch (ArgumentException e) { return(new BadRequestObjectResult(e.Message)); } }
public IActionResult Get([FromRoute, SwaggerParameter("Id of Bill", Required = true)] int Id) { BillGet billGet = _service.Get(Id).ToApi(); return(Ok(billGet)); }