//update note
 public static bool UpdateNote(Note note, ConfigureNote configure)
 {
     try
     {
         fmNote._context.Notes.AddOrUpdate(note);
         fmNote._context.ConfigureNotes.AddOrUpdate(configure);
         fmNote._context.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
 public static bool SaveDeleteNote(Note note, ConfigureNote configure)
 {
     try
     {
         fmNote._context.Trashes.Add(new Trash()
         {
             SDate = note.SDate, Title = note.Tittle, Body = note.Body, UserID = note.UserID, NodeID = note.NodeID, DeDate = DateTime.Now, TrashID = note.NodeID
         });
         fmNote._context.ConfigureTrashes.Add(new ConfigureTrash()
         {
             TrashID   = configure.NodeID,
             FontTrash = configure.FontNote, SizeTrash = configure.SizeNote,
             Boldtxt   = configure.Boldtxt, Italictxt = configure.Italictxt, Underlinetxt = configure.Underlinwtxt, Striketxt = configure.Striketxt, Colortxt = configure.Colortxt
         });
         fmNote._context.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }