// GET: Membre/Cadeaux public ActionResult Index() { ViewBag.Current = "Cadeaux"; CadeauRepository CR = new CadeauRepository(ConfigurationManager.ConnectionStrings["CnstrDev"].ConnectionString); List <CadeauxModel> Lc = CR.GetCadeauxFromMembre(SessionUtils.ConnectedUser.Id).Select(c => MapToDBModel.CadeauxToCadeauxModel(c)).ToList(); return(View(Lc)); }
// GET: Membre/Cadeau public ActionResult Index() { if (!SessionUtils.IsConnected) { return(RedirectToAction("Login", new { controller = "Home", area = "" })); } CadeauRepository Cd = new CadeauRepository(ConfigurationManager.ConnectionStrings["CnstrDev"].ConnectionString); int id = SessionUtils.ConnectedUser.Id; List <CadeauModel> Cmodel = Cd.GetGiftsMember(id).Select(c => MapToDBModel.CadeauToCadeauModel(c)).ToList(); return(View(Cmodel)); }