public ActionResult Edit(NotesView notesView)
        {
            var userEmail = Convert.ToString(HttpContext.Request.Cookies["Email"].Value);

            var user = Repository.Users.FirstOrDefault(p => p.Email == userEmail);
            notesView.UserId = user.ID;

            var note = (Notes)ModelMapper.Map(notesView, typeof(NotesView), typeof(Notes));

            Repository.UpdateNote(note);
            return RedirectToAction("Index");
        }
        public ActionResult Index(int page = 1)
        {
            var userEmail = Convert.ToString(HttpContext.Request.Cookies["Email"].Value);

            var user = Repository.Users.FirstOrDefault(p => p.Email == userEmail);
            var notesView = new NotesView();
            notesView.UserId = user.ID;
            ViewBag.ID = notesView.UserId;
            var data = new PageableData<Notes>(Repository.Note.OrderBy(p => p.UserID).Where(x => x.UserID == notesView.UserId), page, 10);
            return View(data);
        }
 public ActionResult Edit()
 {
     var newNotesView = new NotesView();
     return View(newNotesView);
 }