public ActionResult UserDashBoard() { //Dashbord van ingelogde gebruiker ophalen //Hier zit voorlopig enkel update logica try { ApplicationUser appUser = aMgr.FindById(User.Identity.GetUserId()); string userName = appUser.UserName; Gebruiker user = gMgr.FindUser(userName); Dashbord dashbord = dashMgr.GetDashboardWithFollows(user); dashbord = dashMgr.UpdateDashboard(dashbord); // <-- zien dat elk DashItem up-to-date is return(View(dashbord)); } catch { return(View()); } }
public Dashbord UserDashBoardById(string name) { //Dashbord van ingelogde gebruiker ophalen try { //ApplicationUser appUser = aMgr.FindById(User.Identity.GetUserId()); //string userName = appUser.UserName; Gebruiker user = gMgr.FindUser(name); Dashbord dashbord = dashMgr.GetDashboardWithFollows(user); dashbord = dashMgr.UpdateDashboard(dashbord); // <-- zien dat elk DashItem minstens 3h up-to-date is var list = JsonConvert.SerializeObject(dashbord, Formatting.None, new JsonSerializerSettings() { ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore }); return(dashbord); } catch { return(null); } }