// GET: Home
        public ActionResult Index()
        {
            NoteManager nm = new NoteManager();

            //  return View(nm.GetAllNotes().OrderByDescending(x => x.ModifiedOn));
            return(View(nm.GetAllNotesQueryable().OrderByDescending(x => x.ModifiedOn).ToList()));
        }
        // GET: Note
        public ActionResult Index()
        {
            var notes = noteManager.GetAllNotesQueryable().Include(n => n.Category).Include("EvernoteUser")
                        .Where(x => x.EvernoteUserId == SessionManager.CurrentUser.Id).OrderByDescending(x => x.ModifiedOn);

            return(View(notes.ToList()));
        }
Ejemplo n.º 3
0
        // GET: Home
        public ActionResult Index()
        {
            // Veritabanını yoksa oluşturan metod çağırılıyor
            //BusinessLayer.Test test = new BusinessLayer.Test();
            //test.CommetInsertTest();

            var deger = noteManager.GetAllNotesQueryable().Where(q => q.IsDraft == false).OrderByDescending(q => q.CreatedOn);

            return(View(deger.ToList()));
        }
        // GET: Comment
        public ActionResult ShowNoteComments(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Note note = noteManager.GetAllNotesQueryable().AsQueryable().Include(s => s.Comment).FirstOrDefault(x => x.Id == id);

            if (note == null)
            {
                return(new HttpNotFoundResult());
            }

            return(PartialView("_PartialComment", note.Comment));
        }
        public ActionResult MostLiked()
        {
            NoteManager nm = new NoteManager();

            return(View("Index", nm.GetAllNotesQueryable().OrderByDescending(x => x.LikeCount).ToList()));
        }
Ejemplo n.º 6
0
 public ActionResult MostLiked()
 {
     return(View("Index", _noteManager.GetAllNotesQueryable().Where(x => x.isDraft == false).OrderByDescending(x => x.LikeCount).ToList()));
 }