예제 #1
0
        public void Update(IFavoriteProductEntity entity, IByIdRepositorySpecification <IFavoriteProductEntity, long> spec, Action <IFavoriteProductEntity> success, Action <Exception> error)
        {
            if (spec is FavoriteProductRepositoryByIdSpecification)
            {
                ReactiveFunction(() =>
                {
                    var favorite = new Favorite
                    {
                        Id         = entity.Id,
                        IsFavorite = entity.IsFavorite
                    };

                    simpleDb.SetFavorite(favorite);

                    return(entity);
                }

                                 , success, error);
            }
            else
            {
                throw new ArgumentException();
            }
        }
예제 #2
0
 public void Insert(IFavoriteProductEntity entity, Action <long> success, Action <Exception> error)
 {
     throw new NotImplementedException();
 }