Setting up the AuthenticationRepository
Now we move on to the AuthenticationRepository
. This is the object that will handle access and storage using the UserManager
framework provided by the Identity.EntityFramework
library. Add in a new folder called Repositories
, then add a new file called AuthenticationRepository.cs
, and implement the following:
Note
The UserManager
class is a facade for providing identity management in any ASP.Net application
public class AuthenticationRepository : IDisposable { private AuthenticationContext authenticationContext; private UserManager<IdentityUser> userManager; public AuthenticationRepository() { authenticationContext = new AuthenticationContext(); userManager = new UserManager<IdentityUser>(new UserStore<IdentityUser>(authenticationContext)); ...
Get Xamarin Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.