public override void CreateNewBlog(Blog blog) { IITBlog.Classes.Blog newBlog = new IITBlog.Classes.Blog { UserName = blog.Author, BlogText = blog.Text, Mood = blog.Mood, RecCreationTime = DateTime.Now }; db.Blogs.InsertOnSubmit(newBlog); db.SubmitChanges(); }
public override void AddBlog(Blog blog) { IITBlog.Classes.Blog newBlog = new IITBlog.Classes.Blog { UserName = blog.Author, BlogText = blog.Description, Mood = blog.Mood, RecCreationTime = DateTime.Now, //UserID = Membership.GetUser(blog.Author).ProviderUserKey }; db.Blogs.InsertOnSubmit(newBlog); db.SubmitChanges(); }