Exemple #1
0
        private void CreateUser(VNWDbContext context)
        {
            var manager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(new VNWDbContext()));

            var roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(new VNWDbContext()));

            var user = new ApplicationUser()
            {
                UserName       = "******",
                Email          = "*****@*****.**",
                EmailConfirmed = true,
                BirthDay       = DateTime.Now,
                FullName       = "Lê Khanh"
            };

            manager.Create(user, "123654$");
        }
Exemple #2
0
 public ApplicationUserStore(VNWDbContext context)
     : base(context)
 {
 }
Exemple #3
0
 public VNWDbContext Init()
 {
     return(dbContext ?? (dbContext = new VNWDbContext()));
 }