Exemplo n.º 1
0
        public SocialFavorite SaveFavorite(SocialFavorite favorite)
        {
            var sproc = new SocialSaveFavorite()
            {
                UserIdentifier      = favorite.UserIdentifier,
                ReferenceIdentifier = favorite.ReferenceIdentifier,
                Delete = favorite.Delete
            };

            return(sproc.CallObject <SocialFavorite>());
        }
Exemplo n.º 2
0
        public IEnumerable <SocialFavorite> SaveFavorite(SocialFavorite favorite)
        {
            if (null == favorite)
            {
                throw new ArgumentNullException("Favorite");
            }

            if (Guid.Empty == favorite.ReferenceIdentifier)
            {
                throw new ArgumentException("Reference Identifier");
            }

            favorite.UserIdentifier = User.Identifier();
            var saved = this.socialCore.SaveFavorite(favorite);

            return(null != saved?this.socialCore.SearchFavorite(saved.ReferenceIdentifier) : null);
        }