/// <summary>
 /// Create a new NotebookInfo object.
 /// </summary>
 /// <param name="notebookId">Initial value of the NotebookId property.</param>
 /// <param name="notebookName">Initial value of the NotebookName property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 public static NotebookInfo CreateNotebookInfo(global::System.Guid notebookId, global::System.String notebookName, global::System.Guid userId)
 {
     NotebookInfo notebookInfo = new NotebookInfo();
     notebookInfo.NotebookId = notebookId;
     notebookInfo.NotebookName = notebookName;
     notebookInfo.UserId = userId;
     return notebookInfo;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the NotebookInfo EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToNotebookInfo(NotebookInfo notebookInfo)
 {
     base.AddObject("NotebookInfo", notebookInfo);
 }
        public PartialViewResult NewNotebook(NotebookInfo notebook)
        {
            if (ModelState.IsValid)
            {
                notebook.NotebookId= Guid.NewGuid();
                notebook.UserId = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());
                db.NotebookInfo.AddObject(notebook);
                db.SaveChanges();
                var notebookList = db.NotebookInfo.Where(obj => obj.UserId == userId);
                ViewBag.User = db.aspnet_Users.Single(obj => obj.UserId == userId);
                return PartialView("_Profiles", notebookList.ToList());
            }

            ViewBag.UserId = new SelectList(db.aspnet_Users, "UserId", "UserName", notebook.UserId);
            return PartialView(notebook);
        }