Skip to content

Commit 93de42d

Browse files
Implement the OneWay and TwoWay profiles
1 parent 3e7cbe7 commit 93de42d

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Ace.CSharp.StructuredAutoMapper.Abstractions;
2+
3+
namespace Ace.CSharp.StructuredAutoMapper;
4+
5+
public abstract class OneWayProfile<TLeft, TRight> : AbstractOneWayProfile<TLeft, TRight>
6+
where TLeft : class
7+
where TRight : class
8+
{
9+
public override void ConfigureLeftToRightMapping()
10+
{
11+
_ = CreateMap<TLeft, TRight>();
12+
}
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Ace.CSharp.StructuredAutoMapper.Abstractions;
2+
3+
namespace Ace.CSharp.StructuredAutoMapper;
4+
5+
public abstract class TwoWayProfile<TLeft, TRight> : AbstractTwoWayProfile<TLeft, TRight>
6+
where TLeft : class
7+
where TRight : class
8+
{
9+
public override void ConfigureLeftToRightMapping()
10+
{
11+
_ = CreateMap<TLeft, TRight>();
12+
}
13+
14+
public override void ConfigureRightToLeftMapping()
15+
{
16+
_ = CreateMap<TRight, TLeft>();
17+
}
18+
}

0 commit comments

Comments
 (0)