-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from neozhu/Mapperly
Riok.Mapperly instead of Mapster
- Loading branch information
Showing
6 changed files
with
73 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
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
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,22 @@ | ||
using BlazorPocket.Shared.Dto; | ||
using PocketBaseClient.BlazorPocket.Models; | ||
using Riok.Mapperly.Abstractions; | ||
|
||
|
||
namespace BlazorPocket.Shared.Services; | ||
|
||
[Mapper] | ||
public static partial class ProjectMapper | ||
{ | ||
public static partial ProductDto MapProduct(Product product); | ||
[MapperIgnoreSource(nameof(ProductDto.Id))] | ||
[MapperIgnoreSource(nameof(ProductDto.Created))] | ||
[MapperIgnoreSource(nameof(ProductDto.Updated))] | ||
public static partial Product MapProductDto(ProductDto productDto); | ||
[MapperIgnoreSource(nameof(ProductDto.Id))] | ||
[MapperIgnoreSource(nameof(ProductDto.Created))] | ||
[MapperIgnoreSource(nameof(ProductDto.Updated))] | ||
public static partial void ApplyUpdate(ProductDto productDto,Product product); | ||
public static partial IEnumerable<ProductDto> ProjectToDto(IEnumerable<Product> q); | ||
} | ||
|
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
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
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