public IActionResult BulkDelete(string ids) { try { var arrayIds = ids.Split(","); if (arrayIds.Length == 0) { return new ResponseResult(Response) { StatusCode = (int)StatusCodes.Status400BadRequest, ErrorMessage = "Deleting failed. No record was selected" } } .ToJsonResult(); _repository.Delete(arrayIds); return(Ok($"Successfully Deleted {arrayIds.Length} records.")); }