コード例 #1
0
        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"));
        }
コード例 #2
0
 public async Task <OperationResult <IKeyedDto> > PostAsync([FromBody] BaseFilmPersonDto model)
 {
     return(await _service.AddAsync(model));
 }