last ...
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using AutoMapper;
|
||||
using xAiApi.AI.Models.Entities;
|
||||
using xAiModels.Models;
|
||||
|
||||
namespace xAiApi.AI.Mppings
|
||||
{
|
||||
public class MappingProfiles : Profile
|
||||
{
|
||||
public MappingProfiles()
|
||||
{
|
||||
//
|
||||
#region Entity to Dto ...
|
||||
//
|
||||
CreateMap<XAiProject, XAiProjectDto>()
|
||||
.ForMember(
|
||||
x => x.Owner,
|
||||
opt => opt.MapFrom<XAiProjectOwnerMappingResolver>()
|
||||
);
|
||||
|
||||
//
|
||||
CreateMap<XAiMessage, XAiMessageDto>()
|
||||
.ForMember(
|
||||
x => x.Owner,
|
||||
opt => opt.MapFrom<XAiMessageOwnerMappingResolver>()
|
||||
);
|
||||
|
||||
//
|
||||
CreateMap<XAiConversation, XAiConversationDto>()
|
||||
.ForMember(
|
||||
x => x.Owner,
|
||||
opt => opt.MapFrom<XAiConversationOwnerMappingResolver>()
|
||||
);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Dto to Entity ...
|
||||
CreateMap<XAiProjectDto, XAiProject>();
|
||||
CreateMap<XAiMessageDto, XAiMessage>();
|
||||
CreateMap<XAiConversationDto, XAiConversation>();
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user