diff options
Diffstat (limited to 'src/Services/DevHive.Services/Configurations/Mapping')
| -rw-r--r-- | src/Services/DevHive.Services/Configurations/Mapping/RatingMappings.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Services/DevHive.Services/Configurations/Mapping/RatingMappings.cs b/src/Services/DevHive.Services/Configurations/Mapping/RatingMappings.cs index fefa6d8..4534511 100644 --- a/src/Services/DevHive.Services/Configurations/Mapping/RatingMappings.cs +++ b/src/Services/DevHive.Services/Configurations/Mapping/RatingMappings.cs @@ -8,6 +8,14 @@ namespace DevHive.Services.Configurations.Mapping { public RatingMappings() { + CreateMap<CreateRatingServiceModel, Rating>() + .ForMember(dest => dest.User, src => src.Ignore()) + .ForMember(dest => dest.Post, src => src.Ignore()) + .ForMember(dest => dest.Id, src => src.Ignore()); + + CreateMap<Rating, ReadRatingServiceModel>(); + + CreateMap<UpdateRatingServiceModel, Rating>(); } } } |
