public async Task <IActionResult> CountMasterFilterUtentiByFilterId(int filterId) { try { // passing the filter id to retrieve the number of record found for that filter. var data = await _globalGridManager.CountMasterFilterUtentiByFilterIdAsync(filterId); // creating the azioni object passing the related details and description. var azioniDto = _utilityManager.GetAzioniDtoObject(User, "get", "Count Master Filter User Info By Filter" + ""); // logging the activity record by the user. await _azioniManager.AzioniInsert(azioniDto); return(Ok(data)); } catch (Exception x) { var errorObj = await _utilityManager.ReturnErrorObj(x, User, "Count Master Filter User Info By Filter"); if (x.Message == "Token Expired") { return(Unauthorized()); } return(BadRequest(errorObj)); } }