Ejemplo n.º 1
0
        public HttpResponseMessage PostGame(int?sportID, int?visitorsID, int?homeID, int?visitorsScore, int homeScore, string clock, int?gameStatusID, string status, DateTime?gameDateTime, int?sortOrder)
        {
            if (ModelState.IsValid)
            {
                db.spTICK_Importer_GameCreate(sportID, visitorsID, homeID, visitorsScore, homeScore, clock, gameStatusID, status, gameDateTime, sortOrder);

                db.SaveChanges();

                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created);
                return(response);
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest));
            }
        }