public ActionResult Create(FormCollection formValues)
 {
     Blog blog = new Blog { UserName = "******", RecCreationTime = DateTime.Now, ApplicationName = "/aalferez" };
     if (TryUpdateModel(blog))
     {
         BlogRepo.AddBlog(blog);
         BlogRepo.SaveChanges();
         return RedirectToAction("Details", new { id = blog.BlogID });
     }
     return View();
 }
 /// <summary>
 /// Create a new Blog object.
 /// </summary>
 /// <param name="blogID">Initial value of the BlogID property.</param>
 /// <param name="recCreationTime">Initial value of the RecCreationTime property.</param>
 public static Blog CreateBlog(global::System.Int32 blogID, global::System.DateTime recCreationTime)
 {
     Blog blog = new Blog();
     blog.BlogID = blogID;
     blog.RecCreationTime = recCreationTime;
     return blog;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Blogs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToBlogs(Blog blog)
 {
     base.AddObject("Blogs", blog);
 }
 public ActionResult Create()
 {
     Blog blog = new Blog {UserName = "******",RecCreationTime = DateTime.Now,ApplicationName = "/aalferez" };
     return View(blog);
 }
 public void DeleteBlog(Blog BlogToDelete)
 {
     db.Blogs.DeleteObject(BlogToDelete);
     //db.Blogs.DeleteOnSubmit(BlogToDelete);    //LINQ
     //db.SubmitChanges();
 }
 public void AddBlog(Blog BlogToAdd)
 {
     db.Blogs.AddObject(BlogToAdd);
     //db.Blogs.InsertOnSubmit(BlogToAdd);
     //db.SubmitChanges();
 }