コード例 #1
0
ファイル: CoachService.cs プロジェクト: nbogdand/Proiect-DAW
 public Coach CreateCoach(Coach Coach)
 {
     try
     {
         if (_coachRepository.FindById(Coach.Id) != null)
         {
             return(null);
         }
         _coachRepository.Create(Coach);
         _coachRepository.Save();
         return(Coach);
     }
     catch (Exception ex)
     {
         _logger.LogWarning($"{ex.Message}\r\n{ex.StackTrace}");
         return(null);
     }
 }