예제 #1
0
 public static bool Insert(Guid id, string text, Guid mtid, Guid sid, Guid rid, Guid dtid, bool ia)
 {
     try {
         using (var context = new CentralProcessContext()) {
             var data = MessagingConversationVM.set(id, text, mtid, sid, rid, dtid, ia);
             context.MessagingConversationDB.Add(data);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }
 public static bool Insert(Guid id, string text, Guid messageType, string senderID, Guid roomID, DateTime createdAt)
 {
     try
     {
         using (var context = new UploadersContext())
         {
             var model = MessagingConversationVM.set(id, text, messageType, senderID, roomID, createdAt);
             context.MessagingConversationDB.Add(model);
             context.SaveChanges();
             return(true);
         }
     }
     catch { return(false); }
 }