Example #1
0
        /// <summary>
        /// Creates and maps data to a view model for a custom entity details page.
        /// </summary>
        /// <param name="displayModelType">The type information of the display model to apply to the generic view model.</param>
        /// <param name="mappingParameters">The data passed through to map to the view model.</param>
        public virtual Task <ICustomEntityDetailsPageViewModel <TDisplayModel> > BuildCustomEntityModelAsync <TDisplayModel>(
            CustomEntityDetailsPageViewModelBuilderParameters mappingParameters
            ) where TDisplayModel : ICustomEntityDetailsDisplayViewModel
        {
            var viewModel = _pageViewModelFactory.CreateCustomEntityDetailsPageViewModel <TDisplayModel>();

            _pageViewModelMapper.MapCustomEntityViewModel(viewModel, mappingParameters);

            return(Task.FromResult(viewModel));
        }