コード例 #1
0
ファイル: UnitOfWork.cs プロジェクト: SmyslovSA/Pylon
 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);
 }
コード例 #2
0
ファイル: ProfileService.cs プロジェクト: SmyslovSA/Pylon
 public ProfileService(IUnitOfWork unitOfWork, PylonUserManager userManager)
 {
     _unitOfWork  = unitOfWork;
     _userManager = userManager;
 }