public IEnumerable <Domain.Coin.CoinArticel.CoinArticel> GetNews(CoinArticelInputDto input) { var data = Db.Database.SqlQuery <Domain.Coin.CoinArticel.CoinArticel>($"select Title,Author,Logo,Id,CreateTime from CoinArticel where Category={input.Category} and IsDelete=0 ORDER BY CreateTime desc"); return(data?.Skip(input.pagesize * (input.pageindex > 1 ? input.pageindex - 1 : 0)).Take(input.pagesize)); }
public IActionResult GetList([FromQuery] CoinArticelInputDto input) { var result = _service.GetListCoinArticel(input); return(PageResponse(result)); }
public IActionResult GetNews([FromQuery] CoinArticelInputDto input) { var result = _service.GetNews(input); return(ApiResponse(result)); }
public IActionResult AddCoinArticel([FromBody] CoinArticelInputDto input) { _service.AddCoinArticel(input); return(AddResponse(input)); }