Пример #1
0
        public ActionResult LoginFacebook(usuario user)
        {
            app_lifeContext contexto = new app_lifeContext();
            int             id       = Convert.ToInt32(Session["usuarioLogadoID"].ToString());
            var             query    = from u in contexto.usuarios where u.usuarioID == id select u;

            foreach (var item in query)
            {
                item.idfacebook = user.idfacebook;
            }
            contexto.SaveChanges();

            return(RedirectToAction("Geral", "Lancamento"));
        }
Пример #2
0
        public ActionResult Sincronizar()
        {
            int id = Convert.ToInt32(Session["usuarioLogadoID"]);

            Int64 idFacebook = Convert.ToInt64(Session["usuarioFacebookID"]);


            var queryU = from u in contexto.usuarios where id == u.usuarioID select u;

            foreach (var item in queryU)
            {
                item.idfacebook = idFacebook;
            }
            contexto.SaveChanges();


            return(RedirectToAction("Geral", "Lancamento"));
        }