public GANModel UpdateGan(GANModel gan) { try { _unitOfWork.GANRepository.Update(gan); _unitOfWork.Save(); return(gan); } catch (System.Exception ex) { Console.WriteLine(ex.Message); return(null); } }
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); } }