예제 #1
0
        public async Task <IActionResult> UpdateRuolo([FromBody] RichiesteDto richiesteDto)
        {
            try
            {
                // Retreiving the newly updated richieste object from bll.
                await _richiesteManager.UpdateAsync(User, richiesteDto);

                // creating the azioni object passing the related details and description.
                var azioniDto = _utilityManager.GetAzioniDtoObject(User, "update", "richieste");
                // logging the activity record by the user.
                await _azioniManager.AzioniInsert(azioniDto);

                return(Ok());
            }
            catch (Exception x)
            {
                // Code block of Exception handling and logging into log_operazione table.
                var errorObj = await _utilityManager.ReturnErrorObj(x, User, "Update Richiese");

                // Returning the error object.
                return(BadRequest(errorObj));
            }
        }