using System; using AutoMapper; using InternshipSystem.Api.Queries; using InternshipSystem.Api.Result; using InternshipSystem.Core; using InternshipSystem.Core.Entity.Internship; using InternshipSystem.Core.UglyOrmArtifacts; namespace InternshipSystem.Api { public class ApiProfile : Profile { public ApiProfile() { CreateMap(); CreateMap() .ForMember( result => result.Status, opt => opt.MapFrom(edition => edition.IsOpen ? "Open" : "Archival")); CreateMap(); CreateMap(); CreateMap().IncludeMembers(es => es.Subject); } } }