Ejemplo n.º 1
0
 public AddUserModel(AddUserWithApartmentModel addUserWithApartmentModel)
 {
     Name        = addUserWithApartmentModel.Name;
     Surname     = addUserWithApartmentModel.Surname;
     UserName    = addUserWithApartmentModel.UserName;
     Email       = addUserWithApartmentModel.Email;
     Password    = addUserWithApartmentModel.Password;
     PhoneNumber = addUserWithApartmentModel.PhoneNumber;
 }
Ejemplo n.º 2
0
        public async Task AddTenant(AddUserWithApartmentModel userWithApartmentModel)
        {
            var userModel   = new AddUserModel(userWithApartmentModel);
            var addedUserId = await _userManager.AddTenant(_serviceMapper, userModel);

            var apartment = new ApartmentModel(userWithApartmentModel, addedUserId);

            _apartmentService.AddApartment(apartment);

            _mailService.NewTenantAdded(userModel);
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> AddTenant(AddUserWithApartmentModel userModel)
        {
            await _userService.AddTenant(userModel);

            return(Ok());
        }