UserManager RRS feed

  • Question

  • Hello all,
    I am trying to use UserManager but somehow it's not working. 
    Here's my code:


    private readonly DatabaseContext _context;
    private readonly UserManager<ApplicationUser> _userManager;

    public MyRepository(DatabaseContext context, UserManager<ApplicationUser> userManager) : base(context)
        _context = context;
        _userManager = userManager;


    public async Task<IEnumerable<Company>> GetCompaniesByEmail(string email) {
        var user = await _userManager.FindByEmailAsync(userEmail)    //HERE'S THE ERROR

    {"Invalid attempt to call ReadAsync when reader is closed."}

    Can someone help me out please ? 

    Thursday, October 3, 2019 5:52 PM

All replies