Пример #1
0
        // GET: Chat/Delete/5
        public ActionResult Delete(int id)
        {
            FakeDb fakeDb = FakeDb.Instance;

            ChatMetier.Entities.Chat chat = fakeDb.Get(id);
            return(View(chat));
        }
Пример #2
0
        // GET: Chat/Edit/5
        public ActionResult Edit(int id)
        {
            FakeDb fakeDb = FakeDb.Instance;

            ChatMetier.Entities.Chat chat = fakeDb.Get(id);
            if (chat == null)
            {
                //throw new HttpNotFoundResult();
            }
            return(View(chat));
        }
Пример #3
0
 public ActionResult Edit(ChatMetier.Entities.Chat chat)
 {
     try
     {
         FakeDb fakeDb = FakeDb.Instance;
         fakeDb.Edit(chat);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }