Add dto and services
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using AutoMapper;
|
||||
using GameIdeas.Shared.Dto;
|
||||
using GameIdeas.Shared.Enum;
|
||||
using GameIdeas.Shared.Model;
|
||||
|
||||
namespace GameIdeas.WebAPI.Profiles;
|
||||
|
||||
public class UserProfile : Profile
|
||||
{
|
||||
public UserProfile()
|
||||
{
|
||||
CreateMap<User, UserDto>()
|
||||
.ForMember(d => d.Id, o => o.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.Username, o => o.MapFrom(s => s.Username))
|
||||
.ForMember(d => d.Password, o => o.MapFrom(s => s.Password))
|
||||
.ForMember(d => d.Role, o => o.MapFrom(s => s.Role))
|
||||
.ForMember(d => d.CreationGames, o => o.MapFrom(s => s.CreationGames))
|
||||
.ForMember(d => d.ModificationGames, o => o.MapFrom(s => s.ModificationGames))
|
||||
.ReverseMap();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user