Exemple #1
0
 public static void AddPoems(List <M_Poem> entities)
 {
     using (PoemDBDataContext context = new PoemDBDataContext(CurrentConnection))
     {
         context.M_Poem.InsertAllOnSubmit(entities);
         context.SubmitChanges();
     }
 }
Exemple #2
0
 public static void AddPoem2(M_Poem2 poem)
 {
     using (PoemDBDataContext context = new PoemDBDataContext(CurrentConnection))
     {
         context.M_Poem2.InsertOnSubmit(poem);
         context.SubmitChanges();
     }
 }
Exemple #3
0
 public static void AddBookIndex(IEnumerable <M_BookIndex> entities)
 {
     using (PoemDBDataContext context = new PoemDBDataContext(CurrentConnection))
     {
         context.M_BookIndex.InsertAllOnSubmit(entities);
         context.SubmitChanges();
     }
 }
Exemple #4
0
 public static void AddPoem2(List <M_Poem2> poems, List <M_PoemImage> images)
 {
     using (PoemDBDataContext context = new PoemDBDataContext(CurrentConnection))
     {
         context.M_Poem2.InsertAllOnSubmit(poems);
         if (images.Count > 0)
         {
             context.M_PoemImage.InsertAllOnSubmit(images);
         }
         context.SubmitChanges();
     }
 }