public async Task <IActionResult> Create(ScadenzaCreateInputModel inputModel) { inputModel.Beneficiario = service.GetBeneficiarioById(inputModel.IDBeneficiario); if (ModelState.IsValid) { await service.CreateScadenzaAsync(inputModel); TempData["Message"] = "Inserimento effettuato correttamente".ToUpper(); return(RedirectToAction("Index")); } else { ViewData["Title"] = "Nuova Scadenza".ToUpper(); inputModel.Beneficiari = service.GetBeneficiari; return(View(inputModel)); } }
public Task <ScadenzaViewModel> CreateScadenzaAsync(ScadenzaCreateInputModel inputModel) { return(scadenzaService.CreateScadenzaAsync(inputModel)); }