return software-by-list as ids

ref #268
This commit is contained in:
Collin Barrett 2018-09-03 16:05:35 -05:00
parent f3ee48117b
commit 53c710df2d
2 changed files with 3 additions and 3 deletions

View file

@ -11,9 +11,9 @@ public class ListSummaryDtoMappingProfile : Profile
public ListSummaryDtoMappingProfile() =>
CreateMap<Data.Entities.FilterList, ListSummaryDto>()
.ForMember(d => d.Languages, o => o.MapFrom(l => l.FilterListLanguages.Select(la => la.Language)))
.ForMember(d => d.Software,
.ForMember(d => d.SoftwareIds,
o => o.MapFrom(l =>
l.Syntax.SoftwareSyntaxes.Select(ss => ss.Software.Name)))
l.Syntax.SoftwareSyntaxes.Select(ss => (int)ss.Software.Id)))
.ForMember(d => d.Tags, o => o.MapFrom(l => l.FilterListTags.Select(m => m.Tag)))
.ForMember(d => d.UpdatedDate,
o => o.MapFrom(l =>

View file

@ -10,7 +10,7 @@ public class ListSummaryDto
public uint Id { get; set; }
public IEnumerable<ListLanguagesDto> Languages { get; set; }
public string Name { get; set; }
public IEnumerable<string> Software { get; set; }
public IEnumerable<int> SoftwareIds { get; set; }
public IEnumerable<ListTagDto> Tags { get; set; }
public DateTime? UpdatedDate { get; set; }
}