コード例 #1
0
ファイル: CSharpController.cs プロジェクト: anttieskola/ae
        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);
 }