private async void AddRegistration(object sender, EventArgs e)
        {
            var apartment = new Apartment
            {
                LastName      = LastName.Text,
                StreetAddress = StreetAddress.Text,
                PostalCode    = int.Parse(PostalCode.Text)
            };
            Guid apartmentId = await _registrationService.AddApartment(apartment);

            KeyValueStorage.SetApartmentId(apartmentId);
        }
Пример #2
0
 public async Task <Guid> AddApartment([FromBody] Apartment apartment)
 {
     return(await _registrationService.AddApartment(apartment.LastName, apartment.StreetAddress, apartment.PostalCode));
 }