SignInManager üzerinden ancak EntityFramework olmadan ASP.net kimlik doğrulaması uygulamak arıyorum. Kendi veritabanı katmanımı SQLClient kullanarak oluşturdum ve sadece ASP.net kimlik doğrulama çalışması yapmak için gereken her türlü çağrıyı oluşturmak istiyorum.EntityFramework olmadan ASP.net Core 1 "SignInManager" nasıl kullanılır
(Startup.cs yürütülen) şöyle Ben kodu:
// Add EF services to the services container.
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext<OAuthAppDbContext>(opt => opt.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"]));
// Add Identity services to the services container.
services.AddIdentity<ApplicationUser, ApplicationRole>(options =>
{
options.Cookies.ApplicationCookieAuthenticationScheme = "ApplicationCookie";
options.Cookies.ApplicationCookie.AuthenticationScheme = "ApplicationCookie";
options.Cookies.ApplicationCookie.CookieName = "oAuthInterop";
options.Cookies.ApplicationCookie.AutomaticChallenge = true;
options.Cookies.ApplicationCookie.AutomaticAuthenticate = true;
options.Cookies.ApplicationCookie.DataProtectionProvider = new DataProtectionProvider(new DirectoryInfo("d:\\development\\artefacts"),
configure =>
{
configure.SetApplicationName("TestAuthApp");
//configure.ProtectKeysWithCertificate("thumbprint");
});
})
.AddEntityFrameworkStores<OAuthAppDbContext, int>()
.AddDefaultTokenProviders();
ve ben varlık Framework bağımlılığını kaldırmak (ve kullanıcı bilgilerini toplamak için kendi db yöntemleri çağırmak) gerekmektedir. ASP.net çekirdeğinde benzer bir şey yaptı mı?
Herhangi bir işaretçi için şimdiden teşekkür ederiz! :-)
Sadece merak ettiniz, ef olarak uyguladınız mı? Eğer herhangi bir örnek varsa, lütfen onu gönderebilirsiniz. Teşekkürler – Swamy