Beispiel #1
0
        public ActionResult DeleteMock([FromRoute] string name)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            Mock        mock        = new Mock();
            MockService mockService = new MockService();

            mock = mockService.GetMockbyName(name);
            if (mock == null)
            {
                return(NotFound());
            }

            mockService.DeleteEntryFromDatabase(name);

            return(Ok(mock));
        }