/// <summary> /// Updates the topic /// </summary> /// <param name="TopicID">The topic identifier</param> /// /// <param name="metaKeywords">Key words adds to title (SEO)</param> /// <param name="metaDescription">Description for SEO</param> /// <param name="metaTitle">Title for SEO</param> /// <param name="Name">The name</param> /// <returns>Topic</returns> public static Topic UpdateTopic(int TopicID, string Name, string metaKeywords, string metaDescription, string metaTitle) { DBTopic dbItem = DBProviderManager <DBTopicProvider> .Provider.UpdateTopic(TopicID, Name, metaKeywords, metaDescription, metaTitle); Topic topic = DBMapping(dbItem); return(topic); }
/// <summary> /// Gets a topic by template identifier /// </summary> /// <param name="TopicID">topic identifier</param> /// <returns>topic</returns> public static Topic GetTopicByID(int TopicID) { if (TopicID == 0) { return(null); } DBTopic dbItem = DBProviderManager <DBTopicProvider> .Provider.GetTopicByID(TopicID); Topic Topic = DBMapping(dbItem); return(Topic); }
private static Topic DBMapping(DBTopic dbItem) { if (dbItem == null) { return(null); } var item = new Topic(); item.TopicId = dbItem.TopicId; item.Name = dbItem.Name; return(item); }
private static Topic DBMapping(DBTopic dbItem) { if (dbItem == null) { return(null); } Topic item = new Topic(); item.TopicID = dbItem.TopicID; item.Name = dbItem.Name; item.MetaDescription = dbItem.MetaDescription; item.MetaKeywords = dbItem.MetaKeywords; item.MetaTitle = dbItem.MetaTitle; return(item); }