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)); } }
// ПОДРОБНОСТИ О ПОЛЬЗОВАТЕЛЕ 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)); } }