Beispiel #1
0
 void InitPersistence()
 {
     articleStore = new ArticleStore();
     articleX     = new Article("X", string.Empty);
     articleY     = new Article("Y", string.Empty);
     articleZ     = new Article("Z", string.Empty);
     articleStore.Save(articleX);
     articleStore.Save(articleY);
     articleStore.Save(articleZ);
     articleSubscriptionStore = new ArticleSubscriptionStore();
     eventStore        = new EventStore();
     notificationStore = new NotificationStore();
 }
        // GET: Articles/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Article article = repository.Articles.GetById(id.Value);

            if (article == null)
            {
                return(HttpNotFound());
            }
            Store store = repository.Stores.GetById(article.StoreId);

            var model = new ArticleStore(article, store);

            return(View(model));
        }
Beispiel #3
0
        public static void Main(string[] args)
        {
            ArticleStore store = new ArticleStore();

            for (int i = 0; i < 1000; i++)
            {
                store.Add(new Article()
                {
                    Barcode = i.ToString(),
                    Price = i,
                    Title = i.ToString(),
                    Vendor = i.ToString()
                });
            }

            foreach (var article in store.Range(100,200))
            {
                Console.WriteLine(article.Title);
            }
        }
Beispiel #4
0
 public Feeds(ArticleStore articleStore)
 {
     this.articleStore = articleStore;
 }
Beispiel #5
0
 public Main(ArticleStore articleStore)
 {
     this.articleStore = articleStore;
 }