Ejemplo n.º 1
0
        public async Task <DTO.PersonMaps> GetAllMaps(DTO.StdCollectionInputsId sci, long personId)
        {
            System.Linq.IQueryable <ORMModel.PersonMap> q =
                _db.PersonMap.Include(o => o.Columns).Where(o => o.MasterMapId == sci.Id && o.PersonId == personId);

            var retVal = new PersonMaps();

            await retVal.Run(_mapper, q, sci);

            return(_mapper.Map <DTO.PersonMaps>(retVal));
        }
Ejemplo n.º 2
0
        public async Task <DTO.PersonMaps> GetAllPersonMaps(DTO.StdCollectionInputsId sci)
        {
            var  list   = (List <DTO.SearchParameter>)sci.SearchParameters;
            long mmapId = list.First(o => o.Column.ToLower() == "mastermapid").Value;

            System.Linq.IQueryable <ORMModel.PersonMap> q =
                _db.PersonMap
                .Include(o => o.Columns)
                .Include(o => o.Person)
                .Where(o => o.MasterMapId == mmapId && o.Person.CompanyId == sci.Id)
            ;

            var retVal = new PersonMaps();

            await retVal.Run(_mapper, q, sci);

            return(_mapper.Map <DTO.PersonMaps>(retVal));
        }