public void Remove(IEnumerable <DepartmentModel> rangeOfModels) { try { using (_unitOfWork) { GetDepartmentModel.RemoveRange(rangeOfModels); } } catch (Exception ex) { GetDataTransaction.RollBack(); Debug.WriteLine(_exceptionMessageStringService.CreateExceptionMessage(ex)); } }
public void Add(IEnumerable <DepartmentModel> rangeOfModels) { try { using (_unitOfWork) { GetDepartmentModel.AddRange(rangeOfModels); } } catch (Exception ex) { GetDataTransaction.RollBack(); Debug.WriteLine(_exceptionMessageStringService.CreateExceptionMessage(ex)); throw ex; } finally { this.Complete(); } }
public void Remove(DepartmentModel model) { try { using (_unitOfWork) { GetDepartmentModel.Remove(model); } } catch (Exception ex) { GetDataTransaction.RollBack(); Debug.WriteLine(_exceptionMessageStringService.CreateExceptionMessage(ex)); throw ex; } finally { this.Complete(); } }
public IEnumerable <DepartmentModel> GetAll() { return(GetDepartmentModel.GetAll()); }
public DepartmentModel Get(int id) { return(GetDepartmentModel.GetById(id)); }