public async Task <IActionResult> CountFindByRichlistRisorse(string richId, int risId, string cliId) { try { int count = await _richiesteManager.CountFindByRichlistRisorseAsync(richId, risId, cliId); // creating the azioni object passing the related details and description. var azioniDto = _utilityManager.GetAzioniDtoObject(User, "get", "count richieste_lista_risorse"); // logging the activity record by the user. await _azioniManager.AzioniInsert(azioniDto); return(Ok(new { count = count })); } catch (Exception x) { // Code block of Exception handling and logging into log_operazione table. var errorObj = await _utilityManager.ReturnErrorObj(x, User, "Count richieste_lista_risorse"); // Returning the error object. return(BadRequest(errorObj)); } }