コード例 #1
0
        public ICollection <Resource.AttributeType> query(AttributeTypeQuery query)
        {
            IQueryable <DB.Models.AttributeType> attributeTypes = context.AttributeType.Where(query.asExpression());

            attributeTypes = query.getOrdering(attributeTypes).Skip(query.page * query.results).Take(query.results);
            return(mapper.Map <ICollection <DB.Models.AttributeType>, ICollection <API.Resource.AttributeType> >(attributeTypes.ToList()));
        }
コード例 #2
0
        public JsonResult Get([FromQuery][Bind] AttributeTypeQuery typeQuery)
        {
            ICollection <AttributeType> attributeTypes = _attributeTypeRepo.query(typeQuery);

            return(Json(attributeTypes));
        }