Esempio n. 1
0
 public static Item CreateItem(Category category, string owner,
                                 string title, string description,
                                 string url, string urlName,
                                 DateTime newsDate)
 {
     return Provider.CreateItem(category, owner, title, description, url, urlName, newsDate);
 }
        public override void DeleteCategory(Category category)
        {
            using (TransactionScope transaction = new TransactionScope(mConfiguration))
            {
                CategoryDataStore dataStore = new CategoryDataStore(transaction);

                dataStore.Delete(category.Id);

                transaction.Commit();
            }
        }
Esempio n. 3
0
 public Item(Category pCategory, string pOwner, 
                 string pTitle, string pDescription,
                 string pURL, string pURLName, DateTime pNewsDate)
 {
     Owner = pOwner;
     Title = pTitle;
     Author = pOwner;
     Category = pCategory;
     Description = pDescription;
     URL = pURL;
     URLName = pURLName;
     NewsDate = pNewsDate;
 }
        public override Category CreateCategory(string name, string displayName)
        {
            using (TransactionScope transaction = new TransactionScope(mConfiguration))
            {
                CategoryDataStore dataStore = new CategoryDataStore(transaction);

                Category category = new Category(name, displayName);

                dataStore.Insert(category);

                transaction.Commit();

                return category;
            }
        }
        public override Item CreateItem(Category category, string owner,
                                        string title, string description,
                                        string url, string urlName, 
                                        DateTime newsDate)
        {
            using (TransactionScope transaction = new TransactionScope(mConfiguration))
            {
                ItemDataStore dataStore = new ItemDataStore(transaction);

                Item item = new Item(category, owner, title, description, url, urlName, newsDate);

                dataStore.Insert(item);

                transaction.Commit();

                return item;
            }
        }
Esempio n. 6
0
 public static void DeleteCategory(Category category)
 {
     Provider.DeleteCategory(category);
 }
Esempio n. 7
0
 public static void UpdateCategory(Category category)
 {
     Provider.UpdateCategory(category);
 }
Esempio n. 8
0
 public static IList<Item> GetItems(Category category, PagingInfo paging)
 {
     return Provider.GetItems(category, paging);
 }
        public override IList<Item> GetItems(Category category, PagingInfo paging)
        {
            using (TransactionScope transaction = new TransactionScope(mConfiguration))
            {
                ItemDataStore dataStore = new ItemDataStore(transaction);

                return dataStore.FindByCategory(category, paging);
            }
        }
Esempio n. 10
0
 public abstract void UpdateCategory(Category category);
Esempio n. 11
0
 public abstract IList<Item> GetItems(Category category,
                                     PagingInfo paging);
Esempio n. 12
0
 public abstract void DeleteCategory(Category category);
Esempio n. 13
0
 public abstract Item CreateItem(Category category, string owner,
                                 string title, string description,
                                 string url, string urlName,
                                 DateTime newsDate);