/*========================================================================================================================== | CONSTRUCTOR \-------------------------------------------------------------------------------------------------------------------------*/ /// <summary> /// Constructs a new instances of a <see cref="TopicViewResult"/> based on the <see cref="ITopicViewModelCore.View"/> and /// <see cref="ITopicViewModelCore.ContentType"/>. /// </summary> /// <remarks> /// If the <see cref="ITopicViewModelCore.ContentType"/> is unavailable, it is assumed to be <c>Page</c>. If the <see /// cref="ITopicViewModelCore.View"/> is unavailable, it is assumed to be the same as the <see /// cref="ITopicViewModelCore.ContentType"/>. /// </remarks> public TopicViewResult(ITopicViewModel viewModel) : base() { Contract.Requires(viewModel, nameof(viewModel)); ViewData.Model = viewModel; _contentType = viewModel.ContentType ?? "Page"; _topicView = viewModel.View ?? _contentType; }
public SaveTopicCommand(ITopicViewModel topic) { Topic = topic; }
public DeleteTopicCommand(ITopicViewModel topic) { Topic = topic; }