/// <summary> /// Deprecated Method for adding a new object to the Tokens EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTokens(Token token) { base.AddObject("Tokens", token); }
/// <summary> /// Create a new Token object. /// </summary> /// <param name="key">Initial value of the Key property.</param> /// <param name="userName">Initial value of the UserName property.</param> /// <param name="expirationDate">Initial value of the ExpirationDate property.</param> /// <param name="createdDate">Initial value of the CreatedDate property.</param> public static Token CreateToken(global::System.String key, global::System.String userName, global::System.DateTime expirationDate, global::System.DateTime createdDate) { Token token = new Token(); token.Key = key; token.UserName = userName; token.ExpirationDate = expirationDate; token.CreatedDate = createdDate; return token; }
public void DeleteToken(Token token) { this.DataContext.Tokens.DeleteObject(token); this.DataContext.SaveChanges(); }
public void UpdateToken(Token token) { this.DataContext.SaveChanges(); }
public void AddToken(Token token) { this.DataContext.Tokens.AddObject(token); this.DataContext.SaveChanges(); }