You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 17, 2018. It is now read-only.
@muratg It's worth doing, but I think trying to make it generic, or indeed EF model based might be more bother than its worth. A straightforward SQL, with parameterised queries would do it.
I'm trying to implement such a repository and I use EF. I struggle with figuring out how to properly resolve the corresponding DbContext. The context would be registered as scoped in the DI container, but I don't know how the repository is being registered - or if I would have to register it myself.
I do the following:
// Register db contextservices.AddDbContext<DataProtectionDbContext>(
opts =>{vardpapiMigrationsAssembly=typeof(DataProtectionDbContext).GetTypeInfo().Assembly.GetName().Name;opts.UseSqlServer(dpapiConnectionString, b =>b.MigrationsAssembly(dpapiMigrationsAssembly));});// configure dpapiservices.AddDataProtection().ProtectKeysWithCertificate(GetCertificate())// no support for rollover or revocation when using certificate?.AddKeyManagementOptions(options =>options.XmlRepository=newSqlDatabaseXmlRepository(/* TODO: how to resolve? Repository needs to be an instance and any DI would be for *right now* */))
Would make sense as it's one of the most common shared pieces of infrastructure between multiple servers.
It's mentioned in #145 but doesn't seem to have been built.
The text was updated successfully, but these errors were encountered: