public IQueryable <PhysPerson> GetPPPeople() { var _db = new TaskJGarant.Models.ContragentContext(); IQueryable <PhysPerson> query = _db.PhysPeople; return(query); }
public IQueryable <PhysPerson> GetPUPeople([QueryString("physPersonId")] int?physPersonId) { var _db = new TaskJGarant.Models.ContragentContext(); IQueryable <PhysPerson> query = _db.PhysPeople; if (physPersonId.HasValue && physPersonId > 0) { query = query.Where(p => p.ID == physPersonId); } else { query = null; } return(query); }
public IQueryable <LegalPerson> GetLUPeople([QueryString("legPersonID")] int?legPersonId) { var _db = new TaskJGarant.Models.ContragentContext(); IQueryable <LegalPerson> query = _db.LegalPeople; if (legPersonId.HasValue && legPersonId > 0) { query = query.Where(p => p.ID == legPersonId); } else { query = null; } return(query); }