public PagedResultDto <ThongTinBaoHiemDto> GetThongTinBaoHiems(ThongTinBaoHiemFilter input)
        {
            var query = thongTinBaoHiemRepository.GetAll().Where(x => !x.IsDelete);

            // filter by value
            if (input.soXe != null)
            {
                query = query.Where(x => x.soXe.ToLower().Equals(input.soXe));
            }

            var totalCount = query.Count();

            // sorting
            if (!string.IsNullOrWhiteSpace(input.Sorting))
            {
                query = query.OrderBy(input.Sorting);
            }

            // paging
            var items = query.PageBy(input).ToList();

            // result
            return(new PagedResultDto <ThongTinBaoHiemDto>(
                       totalCount,
                       items.Select(item => ObjectMapper.Map <ThongTinBaoHiemDto>(item)).ToList()));
        }
 public PagedResultDto <ThongTinBaoHiemDto> GetThongTinBaoHiemsByFilter(ThongTinBaoHiemFilter thongTinBaoHiemFilter)
 {
     return(thongTinBaoHiemAppService.GetThongTinBaoHiems(thongTinBaoHiemFilter));
 }