예제 #1
0
        public async Task <IHttpActionResult> Delete([FromUri] int id)
        {
            HttpStatusCode returnCode = HttpStatusCode.NoContent;

            try
            {
                await repository.DeleteArticleAsync(id);
            }
            catch
            {
                returnCode = HttpStatusCode.NotFound;
            }

            return(new StatusCodeResult(returnCode, this));
        }