Beispiel #1
0
 public void DeleteTable(string table)
 {
     using (var context = new AnagramsEntities())
     {
         context.Database.ExecuteSqlCommand("DELETE FROM " + table);
     }
 }
Beispiel #2
0
 public void AddWordsToDatabase(List <string> words)
 {
     using (var context = new AnagramsEntities())
     {
         context.Words.AddRange(words.Select(a => new Word()
         {
             Word1 = a
         }));
         context.SaveChanges();
     }
 }