Esempio n. 1
0
 public Group AddGroup(int tourId, Group group)
 {
     if (this.Exists(tourId) && group.TourId.Equals(tourId))
     {
         var tracked = _context.Set <Group>().Add(group);
         _context.SaveChanges();
         return(tracked.Entity);
     }
     return(null);
 }
Esempio n. 2
0
 public new IList <Job> GetAllByStatus(STATUS status = STATUS.ALL)
 {
     if (status == STATUS.ALL)
     {
         return(this.GetAll());
     }
     else
     {
         return(_context.Set <Job>().Where(m => m.Status == status).ToList());
     }
 }