public void createDummyData(string dbName)
 {
     using (var dataContext = new SampleDBContext(dbName))
     {
         Console.WriteLine("db created...");
     }
 }
Exemple #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);
     }
 }
Exemple #3
0
 public void remove(LibraryPasage passage)
 {
     using (var dataContext = new SampleDBContext("ceit436DB"))
     {
         dataContext.Categories.Remove(passage);
         dataContext.SaveChanges();
     }
 }
Exemple #4
0
 // Object orianted katili class  :))))))
 public List <LibraryPasage> getAll()
 {
     using (var dataContext = new SampleDBContext("ceit436DB"))
     {
         var ptx = (from r in dataContext.Categories select r);
         return(ptx.ToList());
     }
 }