Exemple #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();
            }
        }
Exemple #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;
            }
        }
Exemple #6
0
 public static void DeleteCategory(Category category)
 {
     Provider.DeleteCategory(category);
 }
Exemple #7
0
 public static void UpdateCategory(Category category)
 {
     Provider.UpdateCategory(category);
 }
Exemple #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);
            }
        }
Exemple #10
0
 public abstract void UpdateCategory(Category category);
Exemple #11
0
 public abstract IList<Item> GetItems(Category category,
                                     PagingInfo paging);
Exemple #12
0
 public abstract void DeleteCategory(Category category);
Exemple #13
0
 public abstract Item CreateItem(Category category, string owner,
                                 string title, string description,
                                 string url, string urlName,
                                 DateTime newsDate);