Beispiel #1
0
 public IEnumerable <OutputDtoQueryWishLists> GetByUserId(int uservId)
 {
     return(_wishListRepository
            .GetByUserId(uservId)
            .Select(wishList => new OutputDtoQueryWishLists
     {
         Id = wishList.Id,
         AddedAt = wishList.AddedAt,
         UserWishList = new OutputDtoQueryWishLists.User
         {
             Id = wishList.UserWishList.Id,
             Firstname = wishList.UserWishList.Firstname,
             Lastname = wishList.UserWishList.Lastname
         },
         ItemWishList = new OutputDtoQueryWishLists.Item
         {
             Id = wishList.ItemWishList.Id,
             Label = wishList.ItemWishList.Label,
             Price = wishList.ItemWishList.Price,
             ImageItem = wishList.ItemWishList.ImageItem,
             DescriptionItem = wishList.ItemWishList.DescriptionItem
         }
     }));
 }