Esempio n. 1
0
        public async Task <IActionResult> PostHop([FromBody] HopDto hopDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var result = await _hopService.AddAsync(hopDto);

            return(CreatedAtRoute(new { controller = "hops", }, result));
        }