Example #1
0
        // GET: Resource/Delete/5
        public ActionResult Delete(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db       db       = new Db(DbServices.ConnectionString);
            Resource resource = ResourceServices.Get(id.Value, db);

            if (resource == null)
            {
                return(HttpNotFound());
            }
            return(View(resource));
        }