Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialVitor Leonardo Gaya de Mira
Courses Plus Student 6,408 Pointsadded code from teacher's notes, but got error with UserManager Class.
I added the code from teacher's notes that prevents registration of duplicate e-mails, but I got an error with UserManager Class:
Error CS0305 Using the generic type 'UserManager<TUser, TKey>' requires 2 type arguments Treehouse.FitnessFrog D:\dotnet-user-auth-with-aspnet-identity-fitness-frog\Treehouse.FitnessFrog\Controllers\AccountController.cs 41 Active
1 Answer
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,350 PointsThe provided code snippet is wrong. It should be using _userManager instead of UserManager.
var existingUser = await _userManager.FindByEmailAsync(viewModel.Email);