Exemple #1
0
 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);
 }
Exemple #2
0
 public ProfileService(IUnitOfWork unitOfWork, PylonUserManager userManager)
 {
     _unitOfWork  = unitOfWork;
     _userManager = userManager;
 }