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