예제 #1
0
        public ActionResult Create(Sport sport)
        {
            // Check input
            if (sport == null)
            {
                return(BadRequest());
            }

            _sportService.Create(sport);

            return(CreatedAtRoute("GetSport", new { id = sport.Id.ToString() }, sport));
        }