Exemple #1
0
        /** Initial profile for a new user with no existing profiles */
        private BLLAppDTO.ProfileBLL AddDefaultProfile(Guid userId, BLLAppDTO.WishlistBLL wishlist)
        {
            var defaultProfileBLL = new BLLAppDTO.ProfileBLL
            {
                AppUserId = userId,
                Wishlist  = wishlist
            };
            // Add
            var defaultProfileDAL        = Mapper.Map(defaultProfileBLL);
            var defaultProfileDALTracked = UOW.Profiles.Add(defaultProfileDAL);

            // Track
            UOW.AddToEntityTracker(defaultProfileDALTracked, defaultProfileBLL);
            return(defaultProfileBLL);
        }
Exemple #2
0
        // TODO: FIX! Wishlist is being added twice (with different id). This will ruin interacting with gifts unless the wrong one is deleted first.
        /** Initial wishlist for a new user with no existing profiles */
        private BLLAppDTO.WishlistBLL AddDefaultWishlist(Guid userId)
        {
            var defaultWishlistBLL = new BLLAppDTO.WishlistBLL
            {
                AppUserId = userId,
                Comment   = "Default profile Wishlist"
            };
            // Add
            var defaultWishlistDAL        = Mapper.MapWishlistToDAL(defaultWishlistBLL);
            var defaultWishlistDALTracked = UOW.Wishlists.Add(defaultWishlistDAL);

            // Track
            UOW.AddToEntityTracker(defaultWishlistDALTracked, defaultWishlistBLL);
            return(defaultWishlistBLL);
        }
Exemple #3
0
 public DALAppDTO.WishlistDAL MapWishlistToDAL(BLLAppDTO.WishlistBLL inObject)
 {
     return(Mapper.Map <DALAppDTO.WishlistDAL>(inObject));
 }