示例#1
0
        public HttpResponseMessage AddGame(Game game)
        {
            Result <Game> res = gameBusiness.AddGame(game);

            HttpResponseMessage response = res.Success ?
                                           Request.CreateResponse(HttpStatusCode.Created, res.Data) :
                                           Request.CreateResponse(HttpStatusCode.InternalServerError, res.Message);

            return(response);
        }