Fix a bunch of EF issues

I don't fully understand the issue that was present before, so this is
more of a workaround than a real fix.
This commit is contained in:
Amelia 2025-05-07 23:37:19 +02:00
parent 697a3bb52b
commit 4b13802301
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
10 changed files with 44 additions and 13 deletions

View file

@ -68,9 +68,7 @@ public class AutoMapperProfiles : Profile
CreateMap<AppUserCollection, AppUserCollectionDto>()
.ForMember(dest => dest.Owner, opt => opt.MapFrom(src => src.AppUser.UserName))
.ForMember(dest => dest.ItemCount, opt => opt.MapFrom(src => src.Items.Count));
CreateMap<Person, PersonDto>()
.ForMember(dst => dst.Aliases, opt =>
opt.MapFrom(src => src.Aliases.Select(pa => pa.Alias).ToList()));
CreateMap<Person, PersonDto>();
CreateMap<Genre, GenreTagDto>();
CreateMap<Tag, TagDto>();
CreateMap<AgeRating, AgeRatingDto>();