Files
PlaylistShared/PlaylistShared.Api/Mapping/AppMappingProfile.cs

16 lines
452 B
C#

using AutoMapper;
using PlaylistShared.Api.Entities;
using PlaylistShared.Shared.Auth;
using PlaylistShared.Shared.Shared;
namespace PlaylistShared.Api.Mapping;
public class AppMappingProfile : Profile
{
public AppMappingProfile()
{
CreateMap<SharedPlaylist, SharedPlaylistDto>()
.ForMember(dest => dest.Creator, opt => opt.MapFrom(src => src.Creator));
CreateMap<ApplicationUser, ApplicationUserDto>();
}
}