Exemplo n.º 1
0
        public ActionResult MyLikedNotes()
        {
            using (LikedManager likedManager = new LikedManager())
            {
                var myLikedNotes = likedManager.ListQueryable().Include(x => x.likedUser).Include(x => x.Shareing).Where(x => x.likedUser.Id == CurrentSession.shareBookUser.Id).Select(x => x.Shareing).Include(x => x.Category).Include(x => x.Owner).Select(x => new SharingViewModel()
                {
                    Category     = x.Category,
                    Comments     = x.Comments,
                    Likes        = x.Likes,
                    Title        = x.Title,
                    ImageUrl     = x.ImageUrl,
                    ShareContent = x.ShareContent,
                    Owner        = x.Owner,
                    ModifiedOn   = x.ModifiedOn,
                    CreatedOn    = x.CreatedOn,
                    ModifiedBy   = x.ModifiedBy,
                    Id           = x.Id,
                    CategoryId   = x.CategoryId,
                    isDraft      = x.isDraft,
                    isDelete     = x.isDelete,
                    LikeCount    = x.LikeCount,
                }).OrderByDescending(x => x.ModifiedOn).ToList();

                return(View("Index", myLikedNotes));
            }
        }
Exemplo n.º 2
0
        public ActionResult MyLikedNotes()
        {
            var notes = likedManager.ListQueryable().Include("LikedUser").Include("Note").
                        Where(x => x.LikedUser.Id == CurrentSession.User.Id).Select(x => x.Note).Include("Category").Include("Owner").OrderByDescending(x => x.UpdatedDate);

            return(View("Index", notes.ToList()));
        }
        public ActionResult MyLikedNotes()
        {
            var notes = likedManager.ListQueryable().Include("LikedUser").Include("Note").Where(x => x.LikedUser.Id == CurrentSession.User.Id).Select(x => x.Note).Include("Category").Include("Owner").OrderByDescending(x => x.ModifiedOn);

            //yukarıdaki linq sorgumuzda. önce bize user ıd'sına ait olan liked'ları getir. where sorgusu bize liked nesnesini döner. orada beni ilgilendiren select ile notları dön deriz. onlardan orderby deriz sıralarız.
            return(View("Index", notes.ToList()));
        }
Exemplo n.º 4
0
        public ActionResult MyMostLikedNote()
        {
            EvernoteUser user = CSession.User;


            TempData["MyMostLikedNote"] = likedManager.ListQueryable().Where(x => x.LikedUser.ID == user.ID).Select(x => x.Note).ToList();

            return(RedirectToAction("Index", "Home"));
        }
Exemplo n.º 5
0
        public ActionResult MyLikedProducts()
        {
            var products = likedManager.ListQueryable().Include("LikedUser").Include("Product").Where(
                x => x.LikedUser.Id == CurrentSession.User.Id).Select(
                x => x.Product).Include("Category").Include("Owner").OrderByDescending(
                x => x.ModifiedOn);

            return(View("Index", products.ToList()));
        }
Exemplo n.º 6
0
        public ActionResult MyLikedUruns()
        {
            var uruns = likedManager.ListQueryable().Include("LikedUser").Include("Urun").Where(
                x => x.LikedUser.ID == CurrentSession.User.ID).Select(
                x => x.Urun).Include("Kategori").Include("Owner").OrderByDescending(
                x => x.ModifiedOn);

            return(View("Index", uruns.ToList()));
        }
Exemplo n.º 7
0
        public ActionResult MyLikedNotes()
        {
            var notes = likedManager.ListQueryable(x => x.EvernoteUserID == SessionManager.User.ID)
                        .Include("NvgEverUser").Include("NvgNote")
                        .Select(x => x.NvgNote).Include("NvgCategory").Include("NvgUser")
                        .OrderByDescending(x => x.ModifiedOn);

            return(View("Index", notes.ToList()));
        }
Exemplo n.º 8
0
        [Auth]  //filter ekledik.giriş yapmamışsa yönlendirme yapıyoruz bu classta(Filters klasöründe)(authenticationfilterlogin)
        public ActionResult MyLikedNotes()
        {
            //userın likeledığı notları aldık(çoka çok tablodan veri çektik.)
            var notes = likedManager.ListQueryable().Include("LikedUser").Include("Note").Where(x => x.LikedUser.Id == CurrentSession.User.Id).Select(x => x.Note).Include("Category").Include("Owner").OrderByDescending(x => x.ModifiedOn);



            return(View("Index", notes.ToList()));
        }
Exemplo n.º 9
0
        public ActionResult MyLikedNotes()
        {
            var notes = lm.ListQueryable().Include("NoteUser").Include("Note").Where(
                x => x.NoteUser.Id == CurrentSession.user.Id).Select(
                x => x.Note).Include("Category").Include("NoteUser").OrderByDescending(
                x => x.ModifiedOn);

            return(View("Index", notes.ToList()));
        }
Exemplo n.º 10
0
        public ActionResult MyLikedNotes()
        {
            var notes = likedManager.ListQueryable().Include("LikedUser").Include("Note").Where(
                x => x.LikedUser.Id == SessionManager.User.Id).Select(
                x => x.Note).Include("Hashtags").Include("Owner").OrderByDescending(
                x => x.CreatedDate);

            return(View(notes.ToList()));
        }
Exemplo n.º 11
0
        public ActionResult MyLikedNotes()
        {
            var notes = likedManager.ListQueryable().Include("LikedUser")
                        .Where(x => x.LikedUser.ID == CurrentSession.User.ID)
                        .Select(x => x.Note).Include("Category")
                        .OrderByDescending(x => x.ModifiedOn);

            return(View("MyLikedNotes", notes.ToList()));
        }
Exemplo n.º 12
0
        public ActionResult MyLikedNotes()
        {
            var liked = likedManger.ListQueryable().Include("LikedUser").Include("Note").Where(
                x => x.LikedUser.Id == CurrentSession.CurrentUser.Id).Select(x => x.Note).Include("Category").Include("Owner").OrderByDescending(x => x.ModifiedOn);



            return(View("Index", liked.ToList()));
        }
Exemplo n.º 13
0
        public ActionResult MyLikedShares()
        {
            var shares = likedManager.ListQueryable().Include("LikedUser").
                         Include("Share").Where
                             (x => x.LikedUser.Id == CurrentSession.manager.Id).Select
                             (x => x.Share).Include("Owner").OrderByDescending
                             (x => x.CreatedDate);

            return(View("Index", shares.ToList()));
        }
        public ActionResult MyLikedNotes()
        {
            //Liked tablosundaki liked ları nesnesini döner,o ilişkiler harici LikedUser içerisindeki ilişkili bilgileride alalım, o Sessiondaki kullanıcıya ait,hangi notlar like lanmış bunları seç nesneleri dön ordanda tarih'e göre tersten sıralama yap
            var notes = likedManager.ListQueryable().Include("LikedUser").Include("Note").Where(
                x => x.LikedUser.Id == CurrentSession.User.Id).Select(
                x => x.Note).Include("Category").Include("Owner").OrderByDescending(
                x => x.ModifiedOn);

            return(View("Index", notes.ToList()));
        }
Exemplo n.º 15
0
        public ActionResult MyLikedNotes() //Like attığım notları getireceğim.
        {
            //O an aktif id ile beğeni id lerini karşılaştırıp içlerinden aynı olanı alıyorum ve tarihe göre sıralıyorum.


            var notes = likedManager.ListQueryable().Include("LikedUser").Include("Note").Where(
                x => x.LikedUser.Id == CurrentSession.User.Id).Select(
                x => x.Note).Include("Category").Include("Owner").OrderByDescending(
                x => x.ModifiedOn);


            return(View("Index", notes.ToList()));
        }
Exemplo n.º 16
0
        public ActionResult MyLikedNotes()
        {
            var notes = _likedManager.ListQueryable()
                        .Include(x => x.LikedUser)
                        .Include(x => x.Note)
                        .Where(x => x.LikedUser.Id == CurrentSession.User.Id)
                        .Select(x => x.Note)
                        .Include(x => x.Category)
                        .Include(x => x.Owner)
                        .OrderByDescending(x => x.ModifiedOn);

            return(View(notes.ToList()));
        }
Exemplo n.º 17
0
        public ActionResult MyLikedNotes()
        {
            // likedNotes listesinin çekilmesinin sağlayan linq sorgusu
            IOrderedQueryable <Note> notes = likedManager.ListQueryable()
                                             .Include(q => q.Note)
                                             .Include(q => q.LikedUser)
                                             .Where(q => q.LikedUserId == CurrentSession.User.Id)
                                             .Select(q => q.Note)
                                             .Include(q => q.Category)
                                             .Include(q => q.Owner)
                                             .OrderByDescending(q => q.ModifiedOn);

            return(View("Index", notes.ToList()));
        }
Exemplo n.º 18
0
        public ActionResult MyLikedNotes()
        {
            var articles = liked_mngr.ListQueryable().Include("LikedUser").Include("Articles").Where(x => x.LikedUser.Id == CurrentSession.User.Id).Select(x => x.Articles).Include("Categories").Include("Owner").OrderByDescending(x => x.ModifiedOn);

            return(View("Index", articles.ToList()));
        }
Exemplo n.º 19
0
        public ActionResult MyLikedNotes()
        {
            var books = likedManager.ListQueryable().Include("LikedUser").Include("Note").Where(x => x.Id == CurrentSession.User.Id).Select(x => x.Book).Include("Category").Include("Owner").OrderByDescending(x => x.ModifiedOn);//whereden dönen nesneden notlar arasındakileri modifed on a göre tersten sıraladık

            return(View("Index", books.ToList()));
        }
Exemplo n.º 20
0
        public ActionResult MyLikedNotes()
        {
            var notes = lm.ListQueryable().Include("LikedUser").Include("Note").Where(x => x.LikedUser.Id == SessionHelper.User.Id).Select(x => x.Note).Include("Categori").Include("Owner").OrderByDescending(x => x.ModifiedOn);

            return(View("index", notes.ToList()));
        }