Skip to content

Commit

Permalink
Added missing mapping for images saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Nesterov committed Apr 17, 2020
1 parent a827329 commit 5ccbc83
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/MAVN.Service.SmartVouchers/AutoMapperProfile.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using AutoMapper;
using MAVN.Service.SmartVouchers.AzureRepositories.Entities;
using MAVN.Service.SmartVouchers.Client.Models.Requests;
using MAVN.Service.SmartVouchers.Client.Models.Responses;
using MAVN.Service.SmartVouchers.Domain.Enums;
Expand Down Expand Up @@ -50,6 +51,13 @@ public AutoMapperProfile()
CreateMap<Voucher, VoucherResponseModel>(MemberList.Destination);

CreateMap<BasePaginationRequestModel, PageInfo>(MemberList.Destination);

CreateMap<FileModel, FileInfoEntity>(MemberList.Destination)
.ForMember(e => e.CampaignContentId, opt => opt.MapFrom(c => c.Id))
.ForMember(e => e.ETag, opt => opt.Ignore())
.ForMember(e => e.PartitionKey, opt => opt.Ignore())
.ForMember(e => e.RowKey, opt => opt.Ignore())
.ForMember(e => e.Timestamp, opt => opt.Ignore());
}
}
}

0 comments on commit 5ccbc83

Please sign in to comment.