Hi
For the time being, I have a workaround to this issue. As per the article, the default language is stored in main table and other languages are stored in translation table. But I put default language too in translation table and not using the main table fields anywhere in the app to display.
I have to put all languages entry in translation table. It has solved the problem for the time being. The extra updates are happening but it does not affect the working.
So, as per my idea, we can add some fields in entity having notmapped option on and thus those will never gets updated in database because those will not be there in tables. I did not try that because of time limitations, but will check in some days.
Thanks Neeraj
Found the issue, very strange and I found it after a lot of hit and trials. Not sure why, but writing it here in case it solve someone else's time
The code is same that I pasted before in my question, with a small change. The code lines
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
Need to pasted at last of function, so the correct code that is working for me is
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseCookieAuthentication(new CookieAuthenticationOptions());
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = clientId,
Authority = authority,
PostLogoutRedirectUri = postLogoutRedirectUri,
//AuthenticationMode = AuthenticationMode.Passive,
Notifications = new OpenIdConnectAuthenticationNotifications
{
AuthenticationFailed = context =>
{
context.HandleResponse();
context.Response.Redirect("/Home/Error");
return Task.FromResult(0);
}
}
});
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
Can anybody please reply to my issue ?
Thanks