public static bool Insert(Guid id, string name, Guid oid, Guid aid, Guid dtid, bool ia)
 {
     try {
         var data = MessagingRoomVM.set(id, name, oid, aid, dtid, ia);
         using (var context = new CentralProcessContext()) {
             context.MessagingRoomDB.Add(data);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }
예제 #2
0
 public static bool Insert(Guid id, string name, Guid api, DateTime createdAt)
 {
     try {
         using (var context = new UploadersContext()) {
             var model = MessagingRoomVM.set(id, name, api, createdAt);
             context.MessagingRoomDB.Add(model);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }