예제 #1
0
        public async Task <IHttpActionResult> PostTest(Test test)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            test = await testsRepository.PostTest(test);

            return(CreatedAtRoute("DefaultApi", new { id = test.Id }, test));
        }