//------------------------------------------------------------------------------
//
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Data.EntityClient;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml.Serialization;
[assembly: EdmSchemaAttribute()]
#region EDM Relationship Metadata
[assembly: EdmRelationshipAttribute("DatabaseModel", "UserRole", "Role", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(RelyingPartyLogic.Role), "User", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(RelyingPartyLogic.User))]
[assembly: EdmRelationshipAttribute("DatabaseModel", "FK_AuthenticationToken_User", "User", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(RelyingPartyLogic.User), "AuthenticationToken", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(RelyingPartyLogic.AuthenticationToken))]
[assembly: EdmRelationshipAttribute("DatabaseModel", "FK_IssuedToken_Consumer", "Client", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(RelyingPartyLogic.Client), "ClientAuthorization", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(RelyingPartyLogic.ClientAuthorization))]
[assembly: EdmRelationshipAttribute("DatabaseModel", "FK_IssuedToken_User", "User", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(RelyingPartyLogic.User), "ClientAuthorization", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(RelyingPartyLogic.ClientAuthorization))]
#endregion
namespace RelyingPartyLogic
{
#region Contexts
///
/// No Metadata Documentation available.
///
public partial class DatabaseEntities : ObjectContext
{
#region Constructors
///
/// Initializes a new DatabaseEntities object using the connection string found in the 'DatabaseEntities' section of the application configuration file.
///
public DatabaseEntities() : base("name=DatabaseEntities", "DatabaseEntities")
{
OnContextCreated();
}
///
/// Initialize a new DatabaseEntities object.
///
public DatabaseEntities(string connectionString) : base(connectionString, "DatabaseEntities")
{
OnContextCreated();
}
///
/// Initialize a new DatabaseEntities object.
///
public DatabaseEntities(EntityConnection connection) : base(connection, "DatabaseEntities")
{
OnContextCreated();
}
#endregion
#region Partial Methods
partial void OnContextCreated();
#endregion
#region ObjectSet Properties
///
/// No Metadata Documentation available.
///
public ObjectSet Roles
{
get
{
if ((_Roles == null))
{
_Roles = base.CreateObjectSet("Roles");
}
return _Roles;
}
}
private ObjectSet _Roles;
///
/// No Metadata Documentation available.
///
public ObjectSet Users
{
get
{
if ((_Users == null))
{
_Users = base.CreateObjectSet("Users");
}
return _Users;
}
}
private ObjectSet _Users;
///
/// No Metadata Documentation available.
///
public ObjectSet AuthenticationTokens
{
get
{
if ((_AuthenticationTokens == null))
{
_AuthenticationTokens = base.CreateObjectSet("AuthenticationTokens");
}
return _AuthenticationTokens;
}
}
private ObjectSet _AuthenticationTokens;
///
/// No Metadata Documentation available.
///
public ObjectSet Nonces
{
get
{
if ((_Nonces == null))
{
_Nonces = base.CreateObjectSet("Nonces");
}
return _Nonces;
}
}
private ObjectSet _Nonces;
///
/// No Metadata Documentation available.
///
public ObjectSet Clients
{
get
{
if ((_Clients == null))
{
_Clients = base.CreateObjectSet("Clients");
}
return _Clients;
}
}
private ObjectSet _Clients;
///
/// No Metadata Documentation available.
///
public ObjectSet ClientAuthorizations
{
get
{
if ((_ClientAuthorizations == null))
{
_ClientAuthorizations = base.CreateObjectSet("ClientAuthorizations");
}
return _ClientAuthorizations;
}
}
private ObjectSet _ClientAuthorizations;
///
/// No Metadata Documentation available.
///
public ObjectSet SymmetricCryptoKeys
{
get
{
if ((_SymmetricCryptoKeys == null))
{
_SymmetricCryptoKeys = base.CreateObjectSet("SymmetricCryptoKeys");
}
return _SymmetricCryptoKeys;
}
}
private ObjectSet _SymmetricCryptoKeys;
#endregion
#region AddTo Methods
///
/// Deprecated Method for adding a new object to the Roles EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToRoles(Role role)
{
base.AddObject("Roles", role);
}
///
/// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToUsers(User user)
{
base.AddObject("Users", user);
}
///
/// Deprecated Method for adding a new object to the AuthenticationTokens EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToAuthenticationTokens(AuthenticationToken authenticationToken)
{
base.AddObject("AuthenticationTokens", authenticationToken);
}
///
/// Deprecated Method for adding a new object to the Nonces EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToNonces(Nonce nonce)
{
base.AddObject("Nonces", nonce);
}
///
/// Deprecated Method for adding a new object to the Clients EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToClients(Client client)
{
base.AddObject("Clients", client);
}
///
/// Deprecated Method for adding a new object to the ClientAuthorizations EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToClientAuthorizations(ClientAuthorization clientAuthorization)
{
base.AddObject("ClientAuthorizations", clientAuthorization);
}
///
/// Deprecated Method for adding a new object to the SymmetricCryptoKeys EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToSymmetricCryptoKeys(SymmetricCryptoKey symmetricCryptoKey)
{
base.AddObject("SymmetricCryptoKeys", symmetricCryptoKey);
}
#endregion
#region Function Imports
///
/// No Metadata Documentation available.
///
public int ClearExpiredNonces()
{
return base.ExecuteFunction("ClearExpiredNonces");
}
#endregion
}
#endregion
#region Entities
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DatabaseModel", Name="AuthenticationToken")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class AuthenticationToken : EntityObject
{
#region Factory Method
///
/// Create a new AuthenticationToken object.
///
/// Initial value of the ClaimedIdentifier property.
/// Initial value of the CreatedOnUtc property.
/// Initial value of the LastUsedUtc property.
/// Initial value of the UsageCount property.
/// Initial value of the AuthenticationTokenId property.
public static AuthenticationToken CreateAuthenticationToken(global::System.String claimedIdentifier, global::System.DateTime createdOnUtc, global::System.DateTime lastUsedUtc, global::System.Int32 usageCount, global::System.Int32 authenticationTokenId)
{
AuthenticationToken authenticationToken = new AuthenticationToken();
authenticationToken.ClaimedIdentifier = claimedIdentifier;
authenticationToken.CreatedOnUtc = createdOnUtc;
authenticationToken.LastUsedUtc = lastUsedUtc;
authenticationToken.UsageCount = usageCount;
authenticationToken.AuthenticationTokenId = authenticationTokenId;
return authenticationToken;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String ClaimedIdentifier
{
get
{
return _ClaimedIdentifier;
}
set
{
OnClaimedIdentifierChanging(value);
ReportPropertyChanging("ClaimedIdentifier");
_ClaimedIdentifier = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("ClaimedIdentifier");
OnClaimedIdentifierChanged();
}
}
private global::System.String _ClaimedIdentifier;
partial void OnClaimedIdentifierChanging(global::System.String value);
partial void OnClaimedIdentifierChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public global::System.String FriendlyIdentifier
{
get
{
return _FriendlyIdentifier;
}
set
{
OnFriendlyIdentifierChanging(value);
ReportPropertyChanging("FriendlyIdentifier");
_FriendlyIdentifier = StructuralObject.SetValidValue(value, true);
ReportPropertyChanged("FriendlyIdentifier");
OnFriendlyIdentifierChanged();
}
}
private global::System.String _FriendlyIdentifier;
partial void OnFriendlyIdentifierChanging(global::System.String value);
partial void OnFriendlyIdentifierChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime CreatedOnUtc
{
get
{
return _CreatedOnUtc;
}
private set
{
OnCreatedOnUtcChanging(value);
ReportPropertyChanging("CreatedOnUtc");
_CreatedOnUtc = StructuralObject.SetValidValue(value);
ReportPropertyChanged("CreatedOnUtc");
OnCreatedOnUtcChanged();
}
}
private global::System.DateTime _CreatedOnUtc;
partial void OnCreatedOnUtcChanging(global::System.DateTime value);
partial void OnCreatedOnUtcChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime LastUsedUtc
{
get
{
return _LastUsedUtc;
}
set
{
OnLastUsedUtcChanging(value);
ReportPropertyChanging("LastUsedUtc");
_LastUsedUtc = StructuralObject.SetValidValue(value);
ReportPropertyChanged("LastUsedUtc");
OnLastUsedUtcChanged();
}
}
private global::System.DateTime _LastUsedUtc;
partial void OnLastUsedUtcChanging(global::System.DateTime value);
partial void OnLastUsedUtcChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 UsageCount
{
get
{
return _UsageCount;
}
set
{
OnUsageCountChanging(value);
ReportPropertyChanging("UsageCount");
_UsageCount = StructuralObject.SetValidValue(value);
ReportPropertyChanged("UsageCount");
OnUsageCountChanged();
}
}
private global::System.Int32 _UsageCount;
partial void OnUsageCountChanging(global::System.Int32 value);
partial void OnUsageCountChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 AuthenticationTokenId
{
get
{
return _AuthenticationTokenId;
}
private set
{
if (_AuthenticationTokenId != value)
{
OnAuthenticationTokenIdChanging(value);
ReportPropertyChanging("AuthenticationTokenId");
_AuthenticationTokenId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("AuthenticationTokenId");
OnAuthenticationTokenIdChanged();
}
}
}
private global::System.Int32 _AuthenticationTokenId;
partial void OnAuthenticationTokenIdChanging(global::System.Int32 value);
partial void OnAuthenticationTokenIdChanged();
#endregion
#region Navigation Properties
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "FK_AuthenticationToken_User", "User")]
public User User
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_AuthenticationToken_User", "User").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_AuthenticationToken_User", "User").Value = value;
}
}
///
/// No Metadata Documentation available.
///
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference UserReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_AuthenticationToken_User", "User");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("DatabaseModel.FK_AuthenticationToken_User", "User", value);
}
}
}
#endregion
}
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DatabaseModel", Name="Client")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class Client : EntityObject
{
#region Factory Method
///
/// Create a new Client object.
///
/// Initial value of the ClientId property.
/// Initial value of the ClientIdentifier property.
/// Initial value of the Name property.
/// Initial value of the ClientType property.
public static Client CreateClient(global::System.Int32 clientId, global::System.String clientIdentifier, global::System.String name, global::System.Int32 clientType)
{
Client client = new Client();
client.ClientId = clientId;
client.ClientIdentifier = clientIdentifier;
client.Name = name;
client.ClientType = clientType;
return client;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 ClientId
{
get
{
return _ClientId;
}
set
{
if (_ClientId != value)
{
OnClientIdChanging(value);
ReportPropertyChanging("ClientId");
_ClientId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("ClientId");
OnClientIdChanged();
}
}
}
private global::System.Int32 _ClientId;
partial void OnClientIdChanging(global::System.Int32 value);
partial void OnClientIdChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String ClientIdentifier
{
get
{
return _ClientIdentifier;
}
set
{
OnClientIdentifierChanging(value);
ReportPropertyChanging("ClientIdentifier");
_ClientIdentifier = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("ClientIdentifier");
OnClientIdentifierChanged();
}
}
private global::System.String _ClientIdentifier;
partial void OnClientIdentifierChanging(global::System.String value);
partial void OnClientIdentifierChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public global::System.String ClientSecret
{
get
{
return _ClientSecret;
}
set
{
OnClientSecretChanging(value);
ReportPropertyChanging("ClientSecret");
_ClientSecret = StructuralObject.SetValidValue(value, true);
ReportPropertyChanged("ClientSecret");
OnClientSecretChanged();
}
}
private global::System.String _ClientSecret;
partial void OnClientSecretChanging(global::System.String value);
partial void OnClientSecretChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public global::System.String CallbackAsString
{
get
{
return _CallbackAsString;
}
set
{
OnCallbackAsStringChanging(value);
ReportPropertyChanging("CallbackAsString");
_CallbackAsString = StructuralObject.SetValidValue(value, true);
ReportPropertyChanged("CallbackAsString");
OnCallbackAsStringChanged();
}
}
private global::System.String _CallbackAsString;
partial void OnCallbackAsStringChanging(global::System.String value);
partial void OnCallbackAsStringChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Name
{
get
{
return _Name;
}
set
{
OnNameChanging(value);
ReportPropertyChanging("Name");
_Name = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Name");
OnNameChanged();
}
}
private global::System.String _Name;
partial void OnNameChanging(global::System.String value);
partial void OnNameChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 ClientType
{
get
{
return _ClientType;
}
set
{
OnClientTypeChanging(value);
ReportPropertyChanging("ClientType");
_ClientType = StructuralObject.SetValidValue(value);
ReportPropertyChanged("ClientType");
OnClientTypeChanged();
}
}
private global::System.Int32 _ClientType;
partial void OnClientTypeChanging(global::System.Int32 value);
partial void OnClientTypeChanged();
#endregion
#region Navigation Properties
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "FK_IssuedToken_Consumer", "ClientAuthorization")]
public EntityCollection ClientAuthorizations
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DatabaseModel.FK_IssuedToken_Consumer", "ClientAuthorization");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DatabaseModel.FK_IssuedToken_Consumer", "ClientAuthorization", value);
}
}
}
#endregion
}
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DatabaseModel", Name="ClientAuthorization")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class ClientAuthorization : EntityObject
{
#region Factory Method
///
/// Create a new ClientAuthorization object.
///
/// Initial value of the AuthorizationId property.
/// Initial value of the CreatedOnUtc property.
public static ClientAuthorization CreateClientAuthorization(global::System.Int32 authorizationId, global::System.DateTime createdOnUtc)
{
ClientAuthorization clientAuthorization = new ClientAuthorization();
clientAuthorization.AuthorizationId = authorizationId;
clientAuthorization.CreatedOnUtc = createdOnUtc;
return clientAuthorization;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 AuthorizationId
{
get
{
return _AuthorizationId;
}
set
{
if (_AuthorizationId != value)
{
OnAuthorizationIdChanging(value);
ReportPropertyChanging("AuthorizationId");
_AuthorizationId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("AuthorizationId");
OnAuthorizationIdChanged();
}
}
}
private global::System.Int32 _AuthorizationId;
partial void OnAuthorizationIdChanging(global::System.Int32 value);
partial void OnAuthorizationIdChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime CreatedOnUtc
{
get
{
return _CreatedOnUtc;
}
set
{
OnCreatedOnUtcChanging(value);
ReportPropertyChanging("CreatedOnUtc");
_CreatedOnUtc = StructuralObject.SetValidValue(value);
ReportPropertyChanged("CreatedOnUtc");
OnCreatedOnUtcChanged();
}
}
private global::System.DateTime _CreatedOnUtc;
partial void OnCreatedOnUtcChanging(global::System.DateTime value);
partial void OnCreatedOnUtcChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable ExpirationDateUtc
{
get
{
return _ExpirationDateUtc;
}
set
{
OnExpirationDateUtcChanging(value);
ReportPropertyChanging("ExpirationDateUtc");
_ExpirationDateUtc = StructuralObject.SetValidValue(value);
ReportPropertyChanged("ExpirationDateUtc");
OnExpirationDateUtcChanged();
}
}
private Nullable _ExpirationDateUtc;
partial void OnExpirationDateUtcChanging(Nullable value);
partial void OnExpirationDateUtcChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public global::System.String Scope
{
get
{
return _Scope;
}
set
{
OnScopeChanging(value);
ReportPropertyChanging("Scope");
_Scope = StructuralObject.SetValidValue(value, true);
ReportPropertyChanged("Scope");
OnScopeChanged();
}
}
private global::System.String _Scope;
partial void OnScopeChanging(global::System.String value);
partial void OnScopeChanged();
#endregion
#region Navigation Properties
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "FK_IssuedToken_Consumer", "Client")]
public Client Client
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_IssuedToken_Consumer", "Client").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_IssuedToken_Consumer", "Client").Value = value;
}
}
///
/// No Metadata Documentation available.
///
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference ClientReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_IssuedToken_Consumer", "Client");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("DatabaseModel.FK_IssuedToken_Consumer", "Client", value);
}
}
}
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "FK_IssuedToken_User", "User")]
public User User
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_IssuedToken_User", "User").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_IssuedToken_User", "User").Value = value;
}
}
///
/// No Metadata Documentation available.
///
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference UserReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DatabaseModel.FK_IssuedToken_User", "User");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("DatabaseModel.FK_IssuedToken_User", "User", value);
}
}
}
#endregion
}
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DatabaseModel", Name="Nonce")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class Nonce : EntityObject
{
#region Factory Method
///
/// Create a new Nonce object.
///
/// Initial value of the NonceId property.
/// Initial value of the Context property.
/// Initial value of the Code property.
/// Initial value of the IssuedUtc property.
/// Initial value of the ExpiresUtc property.
public static Nonce CreateNonce(global::System.Int32 nonceId, global::System.String context, global::System.String code, global::System.DateTime issuedUtc, global::System.DateTime expiresUtc)
{
Nonce nonce = new Nonce();
nonce.NonceId = nonceId;
nonce.Context = context;
nonce.Code = code;
nonce.IssuedUtc = issuedUtc;
nonce.ExpiresUtc = expiresUtc;
return nonce;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 NonceId
{
get
{
return _NonceId;
}
set
{
if (_NonceId != value)
{
OnNonceIdChanging(value);
ReportPropertyChanging("NonceId");
_NonceId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("NonceId");
OnNonceIdChanged();
}
}
}
private global::System.Int32 _NonceId;
partial void OnNonceIdChanging(global::System.Int32 value);
partial void OnNonceIdChanged();
///
/// Gets or sets the Provider Endpoint URL the nonce came from.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Context
{
get
{
return _Context;
}
set
{
OnContextChanging(value);
ReportPropertyChanging("Context");
_Context = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Context");
OnContextChanged();
}
}
private global::System.String _Context;
partial void OnContextChanging(global::System.String value);
partial void OnContextChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Code
{
get
{
return _Code;
}
set
{
OnCodeChanging(value);
ReportPropertyChanging("Code");
_Code = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Code");
OnCodeChanged();
}
}
private global::System.String _Code;
partial void OnCodeChanging(global::System.String value);
partial void OnCodeChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime IssuedUtc
{
get
{
return _IssuedUtc;
}
set
{
OnIssuedUtcChanging(value);
ReportPropertyChanging("IssuedUtc");
_IssuedUtc = StructuralObject.SetValidValue(value);
ReportPropertyChanged("IssuedUtc");
OnIssuedUtcChanged();
}
}
private global::System.DateTime _IssuedUtc;
partial void OnIssuedUtcChanging(global::System.DateTime value);
partial void OnIssuedUtcChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime ExpiresUtc
{
get
{
return _ExpiresUtc;
}
set
{
OnExpiresUtcChanging(value);
ReportPropertyChanging("ExpiresUtc");
_ExpiresUtc = StructuralObject.SetValidValue(value);
ReportPropertyChanged("ExpiresUtc");
OnExpiresUtcChanged();
}
}
private global::System.DateTime _ExpiresUtc;
partial void OnExpiresUtcChanging(global::System.DateTime value);
partial void OnExpiresUtcChanged();
#endregion
}
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DatabaseModel", Name="Role")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class Role : EntityObject
{
#region Factory Method
///
/// Create a new Role object.
///
/// Initial value of the Name property.
/// Initial value of the RoleId property.
public static Role CreateRole(global::System.String name, global::System.Int32 roleId)
{
Role role = new Role();
role.Name = name;
role.RoleId = roleId;
return role;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Name
{
get
{
return _Name;
}
set
{
OnNameChanging(value);
ReportPropertyChanging("Name");
_Name = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Name");
OnNameChanged();
}
}
private global::System.String _Name;
partial void OnNameChanging(global::System.String value);
partial void OnNameChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 RoleId
{
get
{
return _RoleId;
}
private set
{
if (_RoleId != value)
{
OnRoleIdChanging(value);
ReportPropertyChanging("RoleId");
_RoleId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("RoleId");
OnRoleIdChanged();
}
}
}
private global::System.Int32 _RoleId;
partial void OnRoleIdChanging(global::System.Int32 value);
partial void OnRoleIdChanged();
#endregion
#region Navigation Properties
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "UserRole", "User")]
public EntityCollection Users
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DatabaseModel.UserRole", "User");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DatabaseModel.UserRole", "User", value);
}
}
}
#endregion
}
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DatabaseModel", Name="SymmetricCryptoKey")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class SymmetricCryptoKey : EntityObject
{
#region Factory Method
///
/// Create a new SymmetricCryptoKey object.
///
/// Initial value of the CryptoKeyId property.
/// Initial value of the Bucket property.
/// Initial value of the Handle property.
/// Initial value of the ExpirationUtc property.
/// Initial value of the Secret property.
public static SymmetricCryptoKey CreateSymmetricCryptoKey(global::System.Int32 cryptoKeyId, global::System.String bucket, global::System.String handle, global::System.DateTime expirationUtc, global::System.Byte[] secret)
{
SymmetricCryptoKey symmetricCryptoKey = new SymmetricCryptoKey();
symmetricCryptoKey.CryptoKeyId = cryptoKeyId;
symmetricCryptoKey.Bucket = bucket;
symmetricCryptoKey.Handle = handle;
symmetricCryptoKey.ExpirationUtc = expirationUtc;
symmetricCryptoKey.Secret = secret;
return symmetricCryptoKey;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 CryptoKeyId
{
get
{
return _CryptoKeyId;
}
set
{
if (_CryptoKeyId != value)
{
OnCryptoKeyIdChanging(value);
ReportPropertyChanging("CryptoKeyId");
_CryptoKeyId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("CryptoKeyId");
OnCryptoKeyIdChanged();
}
}
}
private global::System.Int32 _CryptoKeyId;
partial void OnCryptoKeyIdChanging(global::System.Int32 value);
partial void OnCryptoKeyIdChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Bucket
{
get
{
return _Bucket;
}
set
{
OnBucketChanging(value);
ReportPropertyChanging("Bucket");
_Bucket = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Bucket");
OnBucketChanged();
}
}
private global::System.String _Bucket;
partial void OnBucketChanging(global::System.String value);
partial void OnBucketChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Handle
{
get
{
return _Handle;
}
set
{
OnHandleChanging(value);
ReportPropertyChanging("Handle");
_Handle = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Handle");
OnHandleChanged();
}
}
private global::System.String _Handle;
partial void OnHandleChanging(global::System.String value);
partial void OnHandleChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime ExpirationUtc
{
get
{
return _ExpirationUtc;
}
set
{
OnExpirationUtcChanging(value);
ReportPropertyChanging("ExpirationUtc");
_ExpirationUtc = StructuralObject.SetValidValue(value);
ReportPropertyChanged("ExpirationUtc");
OnExpirationUtcChanged();
}
}
private global::System.DateTime _ExpirationUtc;
partial void OnExpirationUtcChanging(global::System.DateTime value);
partial void OnExpirationUtcChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Byte[] Secret
{
get
{
return StructuralObject.GetValidValue(_Secret);
}
set
{
OnSecretChanging(value);
ReportPropertyChanging("Secret");
_Secret = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Secret");
OnSecretChanged();
}
}
private global::System.Byte[] _Secret;
partial void OnSecretChanging(global::System.Byte[] value);
partial void OnSecretChanged();
#endregion
}
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DatabaseModel", Name="User")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class User : EntityObject
{
#region Factory Method
///
/// Create a new User object.
///
/// Initial value of the EmailAddressVerified property.
/// Initial value of the CreatedOnUtc property.
/// Initial value of the UserId property.
public static User CreateUser(global::System.Boolean emailAddressVerified, global::System.DateTime createdOnUtc, global::System.Int32 userId)
{
User user = new User();
user.EmailAddressVerified = emailAddressVerified;
user.CreatedOnUtc = createdOnUtc;
user.UserId = userId;
return user;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public global::System.String FirstName
{
get
{
return _FirstName;
}
set
{
OnFirstNameChanging(value);
ReportPropertyChanging("FirstName");
_FirstName = StructuralObject.SetValidValue(value, true);
ReportPropertyChanged("FirstName");
OnFirstNameChanged();
}
}
private global::System.String _FirstName;
partial void OnFirstNameChanging(global::System.String value);
partial void OnFirstNameChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public global::System.String LastName
{
get
{
return _LastName;
}
set
{
OnLastNameChanging(value);
ReportPropertyChanging("LastName");
_LastName = StructuralObject.SetValidValue(value, true);
ReportPropertyChanged("LastName");
OnLastNameChanged();
}
}
private global::System.String _LastName;
partial void OnLastNameChanging(global::System.String value);
partial void OnLastNameChanged();
///
/// The email address claimed to be controlled by the user. Whether it is actually owned by the user is indicated by the EmailAddressVerified property.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public global::System.String EmailAddress
{
get
{
return _EmailAddress;
}
set
{
OnEmailAddressChanging(value);
ReportPropertyChanging("EmailAddress");
_EmailAddress = StructuralObject.SetValidValue(value, true);
ReportPropertyChanged("EmailAddress");
OnEmailAddressChanged();
}
}
private global::System.String _EmailAddress;
partial void OnEmailAddressChanging(global::System.String value);
partial void OnEmailAddressChanged();
///
/// A value indicating whether the email address has been verified as actually owned by this user.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Boolean EmailAddressVerified
{
get
{
return _EmailAddressVerified;
}
set
{
OnEmailAddressVerifiedChanging(value);
ReportPropertyChanging("EmailAddressVerified");
_EmailAddressVerified = StructuralObject.SetValidValue(value);
ReportPropertyChanged("EmailAddressVerified");
OnEmailAddressVerifiedChanged();
}
}
private global::System.Boolean _EmailAddressVerified;
partial void OnEmailAddressVerifiedChanging(global::System.Boolean value);
partial void OnEmailAddressVerifiedChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime CreatedOnUtc
{
get
{
return _CreatedOnUtc;
}
private set
{
OnCreatedOnUtcChanging(value);
ReportPropertyChanging("CreatedOnUtc");
_CreatedOnUtc = StructuralObject.SetValidValue(value);
ReportPropertyChanged("CreatedOnUtc");
OnCreatedOnUtcChanged();
}
}
private global::System.DateTime _CreatedOnUtc;
partial void OnCreatedOnUtcChanging(global::System.DateTime value);
partial void OnCreatedOnUtcChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 UserId
{
get
{
return _UserId;
}
private set
{
if (_UserId != value)
{
OnUserIdChanging(value);
ReportPropertyChanging("UserId");
_UserId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("UserId");
OnUserIdChanged();
}
}
}
private global::System.Int32 _UserId;
partial void OnUserIdChanging(global::System.Int32 value);
partial void OnUserIdChanged();
#endregion
#region Navigation Properties
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "UserRole", "Role")]
public EntityCollection Roles
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DatabaseModel.UserRole", "Role");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DatabaseModel.UserRole", "Role", value);
}
}
}
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "FK_AuthenticationToken_User", "AuthenticationToken")]
public EntityCollection AuthenticationTokens
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DatabaseModel.FK_AuthenticationToken_User", "AuthenticationToken");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DatabaseModel.FK_AuthenticationToken_User", "AuthenticationToken", value);
}
}
}
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "FK_IssuedToken_User", "ClientAuthorization")]
public EntityCollection ClientAuthorizations
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DatabaseModel.FK_IssuedToken_User", "ClientAuthorization");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DatabaseModel.FK_IssuedToken_User", "ClientAuthorization", value);
}
}
}
#endregion
}
#endregion
}