Ejemplo n.º 1
0
 public bool DeleteHub(Models.Hub hub)
 {
     if (hub == null)
     {
         return(false);
     }
     _unitOfWork.HubRepository.Delete(hub);
     _unitOfWork.Save();
     return(true);
 }
Ejemplo n.º 2
0
 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());
 }
Ejemplo n.º 3
0
 public bool EditHub(Models.Hub hub)
 {
     _unitOfWork.HubRepository.Edit(hub);
     _unitOfWork.Save();
     return(true);
 }
Ejemplo n.º 4
0
 public bool AddHub(Models.Hub hub)
 {
     _unitOfWork.HubRepository.Add(hub);
     _unitOfWork.Save();
     return(true);
 }
Ejemplo n.º 5
0
 public List <Models.Hub> GetOthersWithDifferentOwner(Models.Hub hub)
 {
     return((from v in _unitOfWork.HubRepository.GetAll()
             where v.HubOwnerID != hub.HubOwnerID
             select v).ToList());
 }