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