public int AddService(MvService service)
 {
     serviceId = 0;
     ActionProcedures.SpServiceIns(JsonConvert.SerializeObject(service, new JsonSerializerSettings {
         ContractResolver = new CamelCasePropertyNamesContractResolver()
     }), ref serviceId);
     return(serviceId);
 }
Exemplo n.º 2
0
 public IActionResult EditService([FromBody] MvService service)
 {
     try
     {
         serviceService.EditService(service);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Exemplo n.º 3
0
 public IActionResult Service([FromBody] MvService service)
 {
     try
     {
         int serviceId = serviceService.AddService(service);
         return(Ok(serviceId));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
 public void EditService(MvService service)
 {
     ActionProcedures.SpServiceUpd(JsonConvert.SerializeObject(service, new JsonSerializerSettings {
         ContractResolver = new CamelCasePropertyNamesContractResolver()
     }));
 }