public bool DeleteHub(Models.Hub hub) { if (hub == null) { return(false); } _unitOfWork.HubRepository.Delete(hub); _unitOfWork.Save(); return(true); }
public List <Models.Hub> GetOthersHavingSameOwner(Models.Hub hub) { return((from v in _unitOfWork.HubRepository.GetAll() where v.HubID != hub.HubID && v.HubOwnerID == hub.HubOwnerID select v).ToList()); }
public bool EditHub(Models.Hub hub) { _unitOfWork.HubRepository.Edit(hub); _unitOfWork.Save(); return(true); }
public bool AddHub(Models.Hub hub) { _unitOfWork.HubRepository.Add(hub); _unitOfWork.Save(); return(true); }
public List <Models.Hub> GetOthersWithDifferentOwner(Models.Hub hub) { return((from v in _unitOfWork.HubRepository.GetAll() where v.HubOwnerID != hub.HubOwnerID select v).ToList()); }