Example #1
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);
        }
Example #2
0
 public IActionResult AddApartment(ApartmentModel apartmentModel)
 {
     return(Created("", _apartmentService.AddApartment(apartmentModel)));
 }