Exemple #1
0
        public async Task <IActionResult> FindAllAsync()
        {
            try
            {
                var content = await db.FindAll();

                logger.LogInformation("------------> All cards have been returned <------------");
                return(Ok(snakeCaseConverter.ConvertToSnakeCase(content)));
            }
            catch (Exception ex)
            {
                logger.LogWarning("------------> An error has occurred <------------ \n" + ex.Message);
                return(BadRequest(ex.Message));
            }
        }