public int AddTest(TestDto newTestDto) { Test test = new Test(); newTestDto.ToTest(test); try { _testRepository.UpdateAndCommit(test); _unitOfWork.SaveChanges(); return test.Id; } catch (Exception ex) { _logger.Log(ex); throw ex; } }
public void UpdateTest(TestDto newTestDto) { Test test = new Test(); newTestDto.ToTest(test); try { _testRepository.Update(test); _unitOfWork.SaveChanges(); } catch (Exception ex) { _logger.Log(ex); throw ex; } }