예제 #1
0
        public ActionResult Delete(int id)
        {
            Database database = Databases.Get(id);

            if (database == null || database.OwnerID != UserAccount.ID)
            {
                ShowMessage("No such database", HtmlMessageType.Error);
                return(RedirectToAction("index"));
            }

            Databases.Delete(database);
            return(RedirectToAction("index"));
        }