Beispiel #1
0
        public static void RecordMachineInfo(MachineInfo machineinfo)
        {
            var localmachine = localMachine();
            localmachine.username = machineinfo.username;
            localmachine.machineId = machineinfo.machineId;
            localmachine.machineName = machineinfo.machineName;
            localmachine.machinepwd = machineinfo.machinepwd;
            localmachine.token = machineinfo.token;

            using (var dbcontext = new SqliteDbContext())
            {
                dbcontext.Update(localmachine);
            }
        }
Beispiel #2
0
 public static async Task SaveXbox(ulong UserId, string Name)
 {
     using (var DbContext = new SqliteDbContext())
     {
         if (DbContext.XBOXtags.Where(x => x.UserId == UserId).Count() < 1)
         {
             DbContext.XBOXtags.Add(new XBOXtag
             {
                 UserId = UserId,
                 Name   = Name
             });
         }
         else
         {
             XBOXtag Current = DbContext.XBOXtags.Where(x => x.UserId == UserId).FirstOrDefault(
                 );
             Current.Name = Name;
             DbContext.Update(Current);
         }
         await DbContext.SaveChangesAsync();
     }
 }