void PostCheckList(GingerNoteC c)
 {
     if (c.NoteChecklist != null)
     {
         foreach (Checklist cl in c.NoteChecklist)
         {
             context.ChecklistT.Add(cl);
         }
     }
 }
 void PostLabel(GingerNoteC c)
 {
     if (c.NoteLabel != null)
     {
         foreach (Label la in c.NoteLabel)
         {
             context.LabelT.Add(la);
         }
     }
 }
 public bool PostNote(GingerNoteC c)
 {
     if (context.GingerNoteT.FirstOrDefault(n => n.NoteId == c.NoteId) == null)
     {
         context.GingerNoteT.Add(c);
         PostCheckList(c);
         PostLabel(c);
         context.SaveChanges();
         return(true);
     }
     return(false);
 }
 public bool PutNote(int id, GingerNoteC Lgn)
 {
     context.Update <GingerNoteC>(Lgn);
     context.SaveChanges();
     return(true);
 }