Esempio n. 1
0
 public Response <Producers> InsertProducers(Producers producers)
 {
     try
     {
         var data = _producerRepository.InsertProducers(producers);
         if (data != null && data.Any())
         {
             return(new Response <Producers>(true, "Success", data[0]));
         }
         return(new Response <Producers>(false, "Fail", null));
     }
     catch (Exception e)
     {
         _logger.Error($"InsertProducers Failed: {e.Message}\n {e.StackTrace}");
         return(new Response <Producers>(false, e.Message, null));
     }
 }