Esempio n. 1
0
        public async Task <IActionResult> Add(EditDiverModel model)
        {
            _ = await _diverService.AddDiverAsync(model);

            return(RedirectToAction("Index", "Divers"));
        }
        public async Task <IActionResult> CreateAsync([FromBody, Required] EditDiverModel model)
        {
            var added = await _diverService.AddDiverAsync(model);

            return(Created("api/divers", added));
        }