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

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

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