Esempio n. 1
0
        public ActionResult Index()
        {
            using (db)
            {
                var comms = db.RecallMessages
                        .Where(x => !x.IsDeleted)
                        .Include(x => x.Author);

                RecallMessageList model = new RecallMessageList()
                {
                    RecallMessages = comms.ToArray()
                };
                
                return View(model);
            }
        }
Esempio n. 2
0
        // ПОДРОБНОСТИ О ПОЛЬЗОВАТЕЛЕ
        public ActionResult UserDetails(string userId)
        {
            var user = _db.Users.Find(userId);

            using (_db)
            {
                var comms = _db.RecallMessages
                        .Where(r => r.User.Id == userId)
                        .Where(x => !x.IsDeleted)
                        .Include(x => x.Author);

                RecallMessageList model = new RecallMessageList()
                {
                    RecallMessages = comms.ToArray()
                };
                
                ViewData["User"] = user;

                return View(model);
            }

        }