public bool DeleteUnit(Unit unit) { if (unit == null) return false; _unitOfWork.UnitRepository.Delete(unit); _unitOfWork.Save(); return true; }
public bool EditUnit(Unit unit) { _unitOfWork.UnitRepository.Edit(unit); _unitOfWork.Save(); return true; }
public bool AddUnit(Unit unit) { _unitOfWork.UnitRepository.Add(unit); _unitOfWork.Save(); return true; }
private Unit BindUnit(UnitViewModel model) { if (model == null) return null; var unit = new Unit() { UnitID = model.UnitID, Name = model.UnitName }; return unit; }