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())); }
public JsonResult Get([FromQuery][Bind] AttributeTypeQuery typeQuery) { ICollection <AttributeType> attributeTypes = _attributeTypeRepo.query(typeQuery); return(Json(attributeTypes)); }