Esempio n. 1
0
        public AlertMsg AddOAuthClientAuthor(OAuthClientAuthor client)
        {
            var      helper         = new SQLiteHelper();
            var      clientIdParam  = new SQLiteParameter("clientId", client.ClientID);
            var      userIdParam    = new SQLiteParameter("userId", client.UserID);
            var      scopeParam     = new SQLiteParameter("scope", client.Scope);
            var      expireUtcParam = new SQLiteParameter("expireUtc", client.ExpireUtc.Ticks);
            var      timeParam      = new SQLiteParameter("time", client.Time.Ticks);
            var      effResult      = helper.ExecNonQuery("INSERT INTO OAuthClientAuthor (ClientId, UserId, Scope, ExpireUtc, Time) VALUES (@clientId, @userId, @scope, @expireUtc, @time);", clientIdParam, userIdParam, scopeParam, expireUtcParam, timeParam);
            AlertMsg result         = effResult;

            result.IsSuccess = effResult.EffectLines == 1;
            return(result);
        }
 public AlertMsg AddOAuthClientAuthor(OAuthClientAuthor client)
 {
     return(_dataAccess.AddOAuthClientAuthor(client));
 }