public void Delete_FKSide()
        {
            _fileSystemItem1.Delete();

            CheckOriginalData(_fileSystemItem1, _fileSystemItem2);
            CheckOriginalOppositeEndPoints(_fileSystemItem1EndPoint, _fileSystemItem2EndPoint);

            CheckCurrentData(_fileSystemItem2);
            CheckCurrentOppositeEndPoints(_fileSystemItem2EndPoint);

            ClientTransaction.Current.Rollback();

            CheckOriginalData(_fileSystemItem1, _fileSystemItem2);
            CheckOriginalOppositeEndPoints(_fileSystemItem1EndPoint, _fileSystemItem2EndPoint);

            CheckCurrentData(_fileSystemItem1, _fileSystemItem2);
            CheckCurrentOppositeEndPoints(_fileSystemItem1EndPoint, _fileSystemItem2EndPoint);

            _fileSystemItem1.Delete();

            ClientTransaction.Current.Commit();

            CheckOriginalData(_fileSystemItem2);
            CheckOriginalOppositeEndPoints(_fileSystemItem2EndPoint);

            CheckCurrentData(_fileSystemItem2);
            CheckCurrentOppositeEndPoints(_fileSystemItem2EndPoint);
        }
Example #2
0
        public ActionResult Delete(String name)
        {
            var            chemin         = (string)MySession.GetChemin();
            string         newPath        = (string)MySession.GetChemin() + "/" + name;
            FileSystemItem fileSystemItem = FileSystemItem.GetElement(newPath, MySession.GetUser().Id);
            bool           result         = fileSystemItem.Delete();

            return(RedirectToAction("Index", "Home", new { Chemin = chemin }));
        }