The ASP.NET Core solution (mws.api/mws.application/mws.domain/ mws.infrastructure) existed only as untracked working files. Adding it to version control, plus a .gitignore for build output and local tooling directories, so the CQRS/mediator refactor plan has a real git history to branch and diff against.
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using AutoMapper;
|
|
using Mws.Application.Accounts;
|
|
using Mws.Application.Auth;
|
|
using Mws.Application.Documents;
|
|
using Mws.Application.Projects;
|
|
using Mws.Application.Roles;
|
|
using Mws.Application.Tasks;
|
|
using Mws.Domain.Documents;
|
|
using Mws.Domain.Roles;
|
|
using Mws.Domain.Tasks;
|
|
using Mws.Domain.Users;
|
|
|
|
namespace Mws.Application.Common;
|
|
|
|
public class MappingProfile : Profile
|
|
{
|
|
public MappingProfile()
|
|
{
|
|
CreateMap<Domain.Projects.Project, ProjectDto>();
|
|
CreateMap<Role, RoleDto>();
|
|
CreateMap<RolePermission, PermissionEntryDto>();
|
|
CreateMap<User, AccountDto>();
|
|
CreateMap<User, UserDto>();
|
|
CreateMap<Document, DocumentDto>();
|
|
CreateMap<Document, DocumentNodeDto>()
|
|
.ForMember(d => d.Children, opt => opt.Ignore());
|
|
CreateMap<TaskItem, TaskDto>()
|
|
.ForMember(d => d.AssigneeName, opt => opt.MapFrom(s => s.Assignee == null ? null : s.Assignee.DisplayName));
|
|
CreateMap<TaskItem, RecentTaskDto>()
|
|
.ForMember(d => d.Status, opt => opt.MapFrom(s => s.Status.ToString()));
|
|
CreateMap<Document, RecentDocumentDto>();
|
|
}
|
|
}
|