public bool verifyToken(string token) { string query = "select cd_sessionId from auth where cd_sessionId = @token and cd_usuario is null"; return(_applicationContext.ConectarBanco <AuthModel>(query.ToString(), new { token }).Any()); }
public void generateSessionId(string token) { string query = "insert into auth(cd_sessionId) values(@token)"; _applicationContext.ConectarBanco <int>(query.ToString(), new { token }); }