Beispiel #1
0
        public async void GetAllDrillsTest()
        {
            try
            {
                var result = await _service.GetAllDrills();

                Assert.NotNull(result);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
        public async Task <IActionResult> GetAllDrills()
        {
            try
            {
                var drills = await _service.GetAllDrills();

                if (drills == null)
                {
                    return(NotFound());
                }

                return(new ObjectResult(drills));
            }
            catch (Exception ex)
            {
                Log.Error(ex, ex.Message);
                return(BadRequest(ex.Message));
            }
        }