示例#1
0
        public async Task <ActionResult> Delete(int id)
        {
            try
            {
                Snipplet s = _repo.Find <Snipplet>(id);
                _repo.Delete(s);
                await _repo.CommitAsync();

                return(RedirectToAction("Index"));
            }
            catch (InvalidOperationException)
            {
                // noop
            }
            return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
        }
示例#2
0
 public void Remove(int id)
 {
     _rootFolderRepository.Delete(id);
 }