Пример #1
0
 public GANModel UpdateGan(GANModel gan)
 {
     try
     {
         _unitOfWork.GANRepository.Update(gan);
         _unitOfWork.Save();
         return(gan);
     }
     catch (System.Exception ex)
     {
         Console.WriteLine(ex.Message);
         return(null);
     }
 }
Пример #2
0
 public GANModel NewGan([FromBody] GANModel gan)
 {
     try
     {
         _unitOfWork.GANRepository.Insert(gan);
         _unitOfWork.Save();
         return(gan);
     }
     catch (System.Exception ex)
     {
         Console.WriteLine(ex.Message);
         return(null);
     }
 }