Ejemplo n.º 1
0
 /// <summary>
 /// 用于向 oauth_symmetriccryptokey EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddTooauth_symmetriccryptokey(oauth_symmetriccryptokey oauth_symmetriccryptokey)
 {
     base.AddObject("oauth_symmetriccryptokey", oauth_symmetriccryptokey);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 创建新的 oauth_symmetriccryptokey 对象。
 /// </summary>
 /// <param name="bucket">Bucket 属性的初始值。</param>
 /// <param name="handle">Handle 属性的初始值。</param>
 /// <param name="expiresUtc">ExpiresUtc 属性的初始值。</param>
 /// <param name="secret">Secret 属性的初始值。</param>
 public static oauth_symmetriccryptokey Createoauth_symmetriccryptokey(global::System.String bucket, global::System.String handle, global::System.DateTime expiresUtc, global::System.Byte[] secret)
 {
     oauth_symmetriccryptokey oauth_symmetriccryptokey = new oauth_symmetriccryptokey();
     oauth_symmetriccryptokey.Bucket = bucket;
     oauth_symmetriccryptokey.Handle = handle;
     oauth_symmetriccryptokey.ExpiresUtc = expiresUtc;
     oauth_symmetriccryptokey.Secret = secret;
     return oauth_symmetriccryptokey;
 }
Ejemplo n.º 3
0
 public void StoreKey(string bucket, string handle, CryptoKey key)
 {
     var keyRow = new oauth_symmetriccryptokey()
     {
         Bucket = bucket,
         Handle = handle,
         Secret = key.Key,
         ExpiresUtc = key.ExpiresUtc,
     };
     var db = new OAuthEntities();
     db.oauth_symmetriccryptokey.AddObject(keyRow);
     db.SaveChanges();
 }