예제 #1
0
 public void DeleteArchiveStorage(BiblosDS.Library.Common.Objects.DocumentArchiveStorage ArchiveStorage)
 {
     using (Model.BiblosDS2010Entities db = new Model.BiblosDS2010Entities(BiblosDSConnectionString))
     {
         var entity = db.ArchiveStorage.Where(x => x.Archive.IdArchive == ArchiveStorage.Archive.IdArchive && x.Storage.IdStorage == ArchiveStorage.Storage.IdStorage).FirstOrDefault();
         if (entity == null)
         {
             throw new Exceptions.ArchiveStorage_Exception();
         }
         db.DeleteObject(entity);
         db.SaveChanges();
     }
 }
예제 #2
0
 public void DeleteStorageArea(Guid IdStorageArea)
 {
     using (Model.BiblosDS2010Entities db = new Model.BiblosDS2010Entities(BiblosDSConnectionString))
     {
         var entity = db.StorageArea.Where(x => x.IdStorageArea == IdStorageArea).First();
         if (entity == null)
         {
             throw new Exception("Nessuna Storage Area individuata");
         }
         db.DeleteObject(entity);
         db.SaveChanges();
     }
 }