Example #1
0
        public IHttpActionResult PostSuperhero(SuperheroDto superhero)
        {
            SuperheroDto result;

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            result = superheroRepository.CreateOrUpdate(superhero);

            return(Ok(result));
        }