示例#1
0
 public AccountController(IUnitOfWork uow, IAuth a)
 {
     unitOfWork = uow;
     userService = new UserService(unitOfWork);
     metroRegionService = new MetroRegionService(unitOfWork);
     webSecurity = new WebSecurity(uow, a);
 }
示例#2
0
        public User ToUser(MetroRegionService metroRegionService)
        {
            var user = new User
            {
                UserProfile = new Profile {
                    FirstName = this.FirstName,
                    LastName = this.LastName,
                    CellPhoneNumber = this.CellPhone,
                    MetroRegion = metroRegionService.GetRegion(this.Region)
                }
            };
            user.SetNewEmail(this.Email);
            user.SetPassword(this.Password);

            return user;
        }
 public void Init()
 {
     unitOfWork = new MockUnitOfWork<MockFlashMercyContext>();
     metroRegionService = new MetroRegionService(unitOfWork);
 }