Пример #1
0
 public void remove(LibraryPasage passage)
 {
     using (var dataContext = new SampleDBContext("ceit436DB"))
     {
         dataContext.Categories.Remove(passage);
         dataContext.SaveChanges();
     }
 }
Пример #2
0
 public LibraryPasage getLibraryData(int id)
 {
     using (var dataContext = new SampleDBContext("ceit436DB"))
     {
         LibraryPasage ptx = dataContext.Categories.Where(x => x.id == id).First();
         return(ptx);
     }
 }