Exemplo n.º 1
0
 public User(ulong ID = 0)
 {
     this.ID = ID;
     if (!DBFunctions.UserExists(ID))
     {
         using (var con = new SQLiteConnection(Constants.Values.DB_CONNECTION_STRING))
         {
             con.Open();
             var stm = "INSERT INTO USERS(USER_ID) VALUES(@id)";
             using (var cmd = new SQLiteCommand(stm, con))
             {
                 cmd.Parameters.AddWithValue("@id", ID);
                 cmd.ExecuteNonQuery();
             }
         }
     }
 }