Skip to content

Commit

Permalink
Update new breaking changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Aug 8, 2024
1 parent 6ce0b96 commit 5f67956
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Lombiq.TrainingDemo/Drivers/ColorFieldDisplayDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using OrchardCore.ContentManagement.Display.ContentDisplay;
using OrchardCore.ContentManagement.Display.Models;
using OrchardCore.ContentManagement.Metadata.Models;
using OrchardCore.DisplayManagement.ModelBinding;
using OrchardCore.DisplayManagement.Views;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
Expand Down Expand Up @@ -56,8 +55,9 @@ public override IDisplayResult Edit(ColorField field, BuildFieldEditorContext co

// NEXT STATION: Settings/ColorFieldSettings

public override async Task<IDisplayResult> UpdateAsync(ColorField field, IUpdateModel updater, UpdateFieldEditorContext context)
public override async Task<IDisplayResult> UpdateAsync(ColorField field, UpdateFieldEditorContext context)
{
var updater = context.Updater;
var viewModel = new EditColorFieldViewModel();

// Using this overload of the model updater you can specifically say what properties need to be updated. This
Expand Down
3 changes: 1 addition & 2 deletions Lombiq.TrainingDemo/Drivers/PersonPartDisplayDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using OrchardCore.ContentManagement.Display.ContentDisplay;
using OrchardCore.ContentManagement.Display.Models;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.ModelBinding;
using OrchardCore.DisplayManagement.Views;
using System.Threading.Tasks;

Expand Down Expand Up @@ -74,7 +73,7 @@ public override IDisplayResult Edit(PersonPart part, BuildPartEditorContext cont

// So we had an Edit (or EditAsync) method that generates the editor shape. Now it's time to do the content
// part-specific model binding and validation.
public override async Task<IDisplayResult> UpdateAsync(PersonPart part, IUpdateModel updater, UpdatePartEditorContext context)
public override async Task<IDisplayResult> UpdateAsync(PersonPart part, UpdatePartEditorContext context)
{
// Via the IUpdateModel you will be able to use the current controller's model binding helpers here in the
// driver. The prefix property will be used to distinguish between similarly named input fields when building
Expand Down

0 comments on commit 5f67956

Please sign in to comment.