diff --git a/Extensions/CommonExtensions.cs b/Extensions/CommonExtensions.cs
index 8ff338e..8664ce5 100644
--- a/Extensions/CommonExtensions.cs
+++ b/Extensions/CommonExtensions.cs
@@ -304,10 +304,14 @@ namespace xCommons.Extensions
/// Convert Using Auto Mapper ...
///
///
+ ///
///
///
///
- public static T MapConvert(this E source)
+ public static T MapConvert(
+ this E source,
+ Action cfgAction = null
+ )
where T : class
where E : class
{
@@ -320,8 +324,16 @@ namespace xCommons.Extensions
//
var dMapConfig = new MapperConfiguration(b =>
{
+ //
b.CreateMap()
.ReverseMap();
+
+ //
+ // Use Specified Provided Actions if Exists ...
+ if (!cfgAction.IsNull())
+ {
+ cfgAction.Invoke(b);
+ }
});
var dMapper = dMapConfig.CreateMapper();
@@ -337,10 +349,14 @@ namespace xCommons.Extensions
/// Convert Using Auto Mapper ...
///
///
+ ///
///
///
///
- public static IEnumerable MapConvert(this IEnumerable source)
+ public static IEnumerable MapConvert(
+ this IEnumerable source,
+ Action cfgAction = null
+ )
{
//
if (source.IsNull())
@@ -351,8 +367,16 @@ namespace xCommons.Extensions
//
var dMapConfig = new MapperConfiguration(b =>
{
+ //
b.CreateMap()
.ReverseMap();
+
+ //
+ // Use Specified Provided Actions if Exists ...
+ if (!cfgAction.IsNull())
+ {
+ cfgAction.Invoke(b);
+ }
});
var dMapper = dMapConfig.CreateMapper();
@@ -368,10 +392,14 @@ namespace xCommons.Extensions
/// Convert Using Auto Mapper ...
///
///
+ ///
///
///
///
- public static ICollection MapConvert(this ICollection source)
+ public static ICollection MapConvert(
+ this ICollection source,
+ Action cfgAction = null
+ )
{
//
if (source.IsNull())
@@ -382,8 +410,16 @@ namespace xCommons.Extensions
//
var dMapConfig = new MapperConfiguration(b =>
{
+ //
b.CreateMap()
.ReverseMap();
+
+ //
+ // Use Specified Provided Actions if Exists ...
+ if (!cfgAction.IsNull())
+ {
+ cfgAction.Invoke(b);
+ }
});
var dMapper = dMapConfig.CreateMapper();
@@ -399,10 +435,14 @@ namespace xCommons.Extensions
/// Convert Using Auto Mapper ...
///
///
+ ///
///
///
///
- public static IList MapConvert(this IList source)
+ public static IList MapConvert(
+ this IList source,
+ Action cfgAction = null
+ )
{
//
if (source.IsNull())
@@ -413,8 +453,16 @@ namespace xCommons.Extensions
//
var dMapConfig = new MapperConfiguration(b =>
{
+ //
b.CreateMap()
.ReverseMap();
+
+ //
+ // Use Specified Provided Actions if Exists ...
+ if (!cfgAction.IsNull())
+ {
+ cfgAction.Invoke(b);
+ }
});
var dMapper = dMapConfig.CreateMapper();
@@ -430,11 +478,15 @@ namespace xCommons.Extensions
/// Convert Using Auto Mapper ...
///
///
+ ///
///
///
///
///
- public static IDictionary MapConvert(this IDictionary source)
+ public static IDictionary MapConvert(
+ this IDictionary source,
+ Action cfgAction = null
+ )
{
//
if (source.IsNull())
@@ -445,8 +497,16 @@ namespace xCommons.Extensions
//
var dMapConfig = new MapperConfiguration(b =>
{
+ //
b.CreateMap()
.ReverseMap();
+
+ //
+ // Use Specified Provided Actions if Exists ...
+ if (!cfgAction.IsNull())
+ {
+ cfgAction.Invoke(b);
+ }
});
var dMapper = dMapConfig.CreateMapper();