public EntityVisit GetByOrderID(int OrderID) { var data = base.DataContext.MonitorOrders.Where(p => p.FK_OrderID == OrderID); if (data.Count() == 1) { return(FactoryVisit.Get(data.Single())); } else { return(null); } }
public EntityVisit Get(int Id) { var data = base.DataContext.MonitorOrders.Where(p => p.PK_MonitorOrdersID == Id); if (data.Count() == 1) { return(FactoryVisit.Get(data.Single())); } else { return(null); } }
public List <EntityVisit> GetAll() { return(FactoryVisit.GetList(base.DataContext.MonitorOrders.ToList())); }
public List <EntityVisit> GetActives() { return(FactoryVisit.GetList(base.DataContext.MonitorOrders.Where(p => p.Status == true).ToList())); }