示例#1
0
        public override async Task <IDisplayResult> UpdateAsync(StaffPart part, IUpdateModel updater, UpdatePartEditorContext context)
        {
            var viewModel = new StaffPartViewModel();
            await updater.TryUpdateModelAsync(viewModel, Prefix);

            part.SomeText.Text = viewModel.SomeText;
            return(await EditAsync(part, context));
        }
示例#2
0
 private static void PopulateViewModel(StaffPart part, StaffPartViewModel viewModel)
 {
     viewModel.SomeText = part.SomeText.Text;
 }