public static Token InsertToken(string tokenValue) { DbConnection.Insert(new Token { Value = tokenValue, }); Token = DatabaseManager.GetFirstToken(); // Do this instead of taking the Token directly to make sure there's only 1 Token object. Maybe not neccessary though. return Token; }
public static void DeleteToken() { DbConnection.DeleteAll<Token>(); Token = null; }