public UnitOfWork() { _pylonContext = new PylonContext(); UserManager = new PylonUserManager(new UserStore <User>(_pylonContext)); UserManager.UserValidator = new UserValidator <User>(UserManager) { AllowOnlyAlphanumericUserNames = false, RequireUniqueEmail = true }; UserManager.PasswordValidator = new PasswordValidator { RequiredLength = 6, RequireNonLetterOrDigit = false, RequireDigit = true, RequireLowercase = true, RequireUppercase = true, }; RoleManager = new PylonRoleManager(new RoleStore <Role>(_pylonContext)); ProfileManager = new ProfileRepository(_pylonContext); ProductManager = new ProductRepository(_pylonContext); OrderManager = new OrderRepository(_pylonContext); }
public ProfileService(IUnitOfWork unitOfWork, PylonUserManager userManager) { _unitOfWork = unitOfWork; _userManager = userManager; }