Exemplo n.º 1
0
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                ChatVM.GetMeuteDeChats().Remove(ChatVM.GetMeuteDeChats().Where(c => c.Id == id).First());

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Exemplo n.º 2
0
        // GET: Chat/Delete/5
        public ActionResult Delete(int id)
        {
            var chat = ChatVM.GetMeuteDeChats().Where(c => c.Id == id).FirstOrDefault();

            return(View(chat));
        }
Exemplo n.º 3
0
        // GET: Chat
        public ActionResult Index()
        {
            var listeDeChats = ChatVM.GetMeuteDeChats();

            return(View(listeDeChats));
        }