forked from grandnode/grandnode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor changes - refactoring Admin - MappingExtensions - ShippingSetti…
…ngsMappingExtensions
- Loading branch information
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
Grand.Web/Areas/Admin/Extensions/Mapping/ShippingSettingsMappingExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Grand.Core.Domain.Shipping; | ||
using Grand.Web.Areas.Admin.Models.Settings; | ||
|
||
namespace Grand.Web.Areas.Admin.Extensions | ||
{ | ||
public static class ShippingSettingsMappingExtensions | ||
{ | ||
public static ShippingSettingsModel ToModel(this ShippingSettings entity) | ||
{ | ||
return entity.MapTo<ShippingSettings, ShippingSettingsModel>(); | ||
} | ||
public static ShippingSettings ToEntity(this ShippingSettingsModel model, ShippingSettings destination) | ||
{ | ||
return model.MapTo(destination); | ||
} | ||
} | ||
} |