public async Task <IActionResult> Get([FromQuery] SanPhamQuery query) { GetResult rs = (ThuongMaiDienTuAPI.Helpers.GetResult) await sanPhamService.Get(query); rs.Content = mapper.Map <List <SanPhamCommonViewDto> >((List <SanPham>)rs.Content); return(Ok(rs.Get())); }
public async Task <IActionResult> Get([FromQuery] DanhMucSPQuery query) { GetResult rs = (ThuongMaiDienTuAPI.Helpers.GetResult) await danhMucSPService.Get(query); rs.Content = mapper.Map <List <DanhMucSPDto> >((List <DanhMucSP>)rs.Content); return(Ok(rs.Get())); }