示例#1
0
        public async Task <IActionResult> Delete(int id)
        {
            var game = gameRepository.Get(id);

            if (game != null)
            {
                gameRepository.Delete(game);
            }

            return(RedirectToAction("Index"));
        }
 public HttpResponseMessage Delete(int id)
 {
     boardGameRep.Delete(id);
     return(Request.CreateResponse(HttpStatusCode.OK));
 }