diff options
7 files changed, 12 insertions, 12 deletions
diff --git a/projecttemplates/RelyingPartyDatabase/RelyingPartyDatabase.dbproj b/projecttemplates/RelyingPartyDatabase/RelyingPartyDatabase.dbproj index 4743bc3..c603b6e 100644 --- a/projecttemplates/RelyingPartyDatabase/RelyingPartyDatabase.dbproj +++ b/projecttemplates/RelyingPartyDatabase/RelyingPartyDatabase.dbproj @@ -144,7 +144,7 @@ <AnsiNulls>On</AnsiNulls> <QuotedIdentifier>On</QuotedIdentifier> </Build> - <Build Include="Schema Objects\Schemas\dbo\Programmability\Stored Procedures\ClearExpiredAssociations.proc.sql"> + <Build Include="Schema Objects\Schemas\dbo\Programmability\Stored Procedures\ClearExpiredCryptoKeys.proc.sql"> <SubType>Code</SubType> <AnsiNulls>On</AnsiNulls> <QuotedIdentifier>On</QuotedIdentifier> diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/ClearExpiredAssociations.proc.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/ClearExpiredAssociations.proc.sql deleted file mode 100644 index 6a143d0..0000000 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/ClearExpiredAssociations.proc.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE PROCEDURE dbo.ClearExpiredAssociations -AS - -DELETE FROM dbo.OpenIDAssociation -WHERE [Expiration] < getutcdate() diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/ClearExpiredCryptoKeys.proc.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/ClearExpiredCryptoKeys.proc.sql new file mode 100644 index 0000000..777ba9b --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/ClearExpiredCryptoKeys.proc.sql @@ -0,0 +1,5 @@ +CREATE PROCEDURE dbo.ClearExpiredCryptoKeys +AS + +DELETE FROM dbo.CryptoKey +WHERE [Expiration] < getutcdate() diff --git a/projecttemplates/RelyingPartyLogic/Model.Designer.cs b/projecttemplates/RelyingPartyLogic/Model.Designer.cs index 1169aa2..fe9e43b 100644 --- a/projecttemplates/RelyingPartyLogic/Model.Designer.cs +++ b/projecttemplates/RelyingPartyLogic/Model.Designer.cs @@ -15,7 +15,7 @@ [assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("DatabaseModel", "FK_IssuedToken_User", "User", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(RelyingPartyLogic.User), "ClientAuthorization", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(RelyingPartyLogic.ClientAuthorization))] // Original file name: -// Generation date: 5/15/2011 5:33:40 PM +// Generation date: 5/20/2011 5:13:47 PM namespace RelyingPartyLogic { diff --git a/projecttemplates/RelyingPartyLogic/Model.cs b/projecttemplates/RelyingPartyLogic/Model.cs index ca87c90..77d1b83 100644 --- a/projecttemplates/RelyingPartyLogic/Model.cs +++ b/projecttemplates/RelyingPartyLogic/Model.cs @@ -27,8 +27,8 @@ namespace RelyingPartyLogic { /// Clears the expired associations. /// </summary> /// <param name="transaction">The transaction to use, if any.</param> - internal void ClearExpiredAssociations(EntityTransaction transaction) { - this.ExecuteCommand(transaction, "DatabaseEntities.ClearExpiredAssociations"); + internal void ClearExpiredCryptoKeys(EntityTransaction transaction) { + this.ExecuteCommand(transaction, "DatabaseEntities.ClearExpiredCryptoKeys"); } } } diff --git a/projecttemplates/RelyingPartyLogic/Model.edmx b/projecttemplates/RelyingPartyLogic/Model.edmx index 5968b03..fa8d570 100644 --- a/projecttemplates/RelyingPartyLogic/Model.edmx +++ b/projecttemplates/RelyingPartyLogic/Model.edmx @@ -184,7 +184,7 @@ </Dependent> </ReferentialConstraint> </Association> - <Function Name="ClearExpiredAssociations" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> + <Function Name="ClearExpiredCryptoKeys" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> <Function Name="ClearExpiredNonces" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> </Schema></edmx:StorageModels> <!-- CSDL content --> diff --git a/projecttemplates/RelyingPartyLogic/RelyingPartyApplicationDbStore.cs b/projecttemplates/RelyingPartyLogic/RelyingPartyApplicationDbStore.cs index 670f1d5..1ecc01c 100644 --- a/projecttemplates/RelyingPartyLogic/RelyingPartyApplicationDbStore.cs +++ b/projecttemplates/RelyingPartyLogic/RelyingPartyApplicationDbStore.cs @@ -84,9 +84,9 @@ namespace RelyingPartyLogic { /// This should be done frequently enough to avoid a memory leak, but sparingly enough /// to not be a performance drain. /// </remarks> - internal void ClearExpiredAssociations() { + internal void ClearExpiredCryptoKeys() { using (var dataContext = new TransactedDatabaseEntities(IsolationLevel.ReadCommitted)) { - dataContext.ClearExpiredAssociations(dataContext.Transaction); + dataContext.ClearExpiredCryptoKeys(dataContext.Transaction); } } } |