public async Task <IActionResult> Get(int offset = 0, int limit = 10, string filter = null, string sort = null, string order = null) { var orderBy = string.IsNullOrEmpty(sort) ? "" : $"ORDER BY {sort} {order}"; var records = await _service.GetPagedAsync(offset, limit, filter, orderBy); var response = new PagedListViewModel <GuestDTO>(records, records.FirstOrDefault()?.Total); return(Ok(response)); }