Exemple #1
0
        public static Result <Suffix> QueryPageList(ReqSuffix req)
        {
            var dbContext = new DbContext();
            Expression <Func <Suffix, bool> > fun = null;

            if (req.Word.IsNotNullOrEmpty())
            {
                fun = (r) => SqlFunc.Contains(r.Word, req.Word);
            }

            var result = dbContext.SuffixDb.GetPages(req.ConvertData(), fun, req.PageInfo);

            if (result.Results != null)
            {
                result.Results.ForEach(r => {
                    if (r.Json.IsNotNullOrEmpty())
                    {
                        r.Extensions = JsonConvert.DeserializeObject <List <FixExtension> >(r.Json);
                    }
                });
            }

            return(result);
        }
Exemple #2
0
 public ResponseResult Get([FromQuery] ReqSuffix req)
 {
     req.PageInfo = HttpContext.Request.GetPageInfo();
     return(new ResponseResult(0, "", BLL.SuffixBLL.QueryPageList(req)));
 }