public void GetTopicDetails() { TopicDetails_tb model = new TopicDetails_tb(); var result = repo.GetTopicDetailsById(1); Assert.IsNotNull(result); }
public bool PostBlog(int Courseid, int topicId, string Postheader, string Author, string Description, string Categories, string Details) { TopicDetails_tb model = new TopicDetails_tb(); model.TopicId = topicId; model.CourseID = Courseid; model.TopicName = Postheader; model.PostedBy = Author; model.TopicDetails = Details; model.TechnologyType = Categories; entity.TopicDetails_tb.Add(model); var success = Convert.ToBoolean(entity.SaveChanges()); return(success); }
public void InsertTopicDetails(int topicId, string topicName, string technologyType, string PostedBy, DateTime createdDate, DateTime updatedDate, bool isActive, int courseId, string topicPath) { TopicDetails_tb model = new TopicDetails_tb(); model.TopicId = topicId; model.TopicName = topicName; model.TechnologyType = technologyType; model.PostedBy = PostedBy; model.CreatedDate = DateTime.Now; model.UpdateDate = updatedDate; model.Active = isActive; model.CourseID = courseId; model.TopicPath = topicPath; entity.TopicDetails_tb.Add(model); entity.SaveChanges(); }