Ejemplo n.º 1
0
 public void DeleteTable(string table)
 {
     using (var context = new AnagramsEntities())
     {
         context.Database.ExecuteSqlCommand("DELETE FROM " + table);
     }
 }
Ejemplo n.º 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();
     }
 }