Esempio n. 1
0
        public async Task <IActionResult> LoginClients()
        {
            try
            {
                var log = await _clientManager.GetAllClientDataAsync();

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

                // Returning the error object.
                return(BadRequest(errorObj));
            }
        }
Esempio n. 2
0
        public async Task <IActionResult> GetAllClienti()
        {
            try
            {
                var categories = await _clientManager.GetAllClientDataAsync();

                if (categories == null)
                {
                    return(NotFound());
                }
                return(Ok(categories));
            }
            catch (Exception x)
            {
                // Code block of Exception handling and logging into log_operazione table.
                var errorObj = await _utilityManager.ReturnErrorObj(x, User, "Get Client");

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