0

After reading more than 20 pages about this subject im constraint to ask help

Im using C# MVC .ASP NET CORE I want to host the user of the application on the sql database => not on the local database

I added the AspNetUsers tables in my database (like this) image And changed in Models/IdentityModels.cs

    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
    public ApplicationDbContext()
        : base("dbApp", throwIfV1Schema: false)
    {
    }

    public static ApplicationDbContext Create()
    {
        return new ApplicationDbContext();
    }
}

with the good string connection name from Web.config

Somemone can say me why i get this error :

var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);

Thanks all

Aym2ric
  • 31
  • 1
  • 1
  • 6
  • Because title of topic need to be unique (but why are you asking me this ????) – Aym2ric Mar 13 '19 at 15:17
  • Because if the title already exists, then the question has already been asked and you shouldn't be asking it again :) – DavidG Mar 13 '19 at 15:18
  • Yes im according to you, but if the topic dont answer my problem, how i do ? This question was posted lot of time, you can check ^^ – Aym2ric Mar 13 '19 at 15:23
  • And every time it is posted, people write the same answers. – DavidG Mar 13 '19 at 15:24
  • Not really because this error message is used for multiple cases – Aym2ric Mar 13 '19 at 15:26
  • No it isn't, this error is very specific. – DavidG Mar 13 '19 at 15:27
  • Possible duplicate of [The entity type ApplicationUser is not part of the model for the current context](https://stackoverflow.com/questions/23893710/the-entity-type-applicationuser-is-not-part-of-the-model-for-the-current-context) – Schmocken Mar 13 '19 at 16:01

0 Answers0