public async Task <IErrorPageViewModel> BuildErrorPageViewModelAsync(ErrorPageViewModelBuilderParameters mappingParameters) { // This example show using the default behaviour without any customization // You could alternatively inherit from PageViewModelBuilder and use the base implementation var viewModel = _pageViewModelFactory.CreateErrorPageViewModel(); await _pageViewModelMapper.MapErrorPageViewModelAsync(viewModel, mappingParameters); return(viewModel); }
/// <summary> /// Creates and maps data to a view model for a generic error page. /// </summary> /// <param name="mappingParameters">The data passed through to map to the view model.</param> public virtual async Task <IErrorPageViewModel> BuildErrorPageViewModelAsync( ErrorPageViewModelBuilderParameters mappingParameters ) { var viewModel = _pageViewModelFactory.CreateNotFoundPageViewModel(); await _pageViewModelMapper.MapErrorPageViewModelAsync(viewModel, mappingParameters); return(viewModel); }