I want to implement pagination on an api call that returns a list of strings, based on the id and I am having a little trouble here. Here is my HttpGet call
[Route("getLogsFileNames/{id}")]
public IActionResult GetLogsFileNames(Guid id, string include = "")
{
return Ok(_deidentificationService.GetLogsFileNames(id, include));
}
And here is the implementation from the service
public List<string> GetLogsFileNames(Guid deviceId, string include = "")
{
var blobNames = new List<string>();
var blobs = _blobUtils.GetBlobsFromContainer(deviceId);
if (string.IsNullOrEmpty(include))
{
blobs.ToList().ForEach(blob => blobNames.Add(blob.Name));
}
else
{
blobs.Where(blob => blob.Name.ToLower().Contains(include.ToLower())).ToList()
.ForEach(blob => blobNames.Add(blob.Name));
}
return blobNames;
}
any ideas?