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(); } }
public void Insert(IFavoriteProductEntity entity, Action <long> success, Action <Exception> error) { throw new NotImplementedException(); }