public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } var s = await _service.AddAsync(FilmPersonToAdd); if (s != OperationStatus.OK) { return(HandleError(s, _action)); } return(RedirectToPage("./Index")); }
public async Task <OperationResult <IKeyedDto> > PostAsync([FromBody] BaseFilmPersonDto model) { return(await _service.AddAsync(model)); }