private async void BtnValider_Clicked(object sender, System.EventArgs e) { Space s = new Space { Capacity = ((EspaceViewModel)this.BindingContext).Capacity, CreatedAt = DateTime.Now, Description = ((EspaceViewModel)this.BindingContext).Description, Name = ((EspaceViewModel)this.BindingContext).Name, Picture = ((EspaceViewModel)this.BindingContext).Picture, Type = ((EspaceViewModel)this.BindingContext).Type, CreatedBy = 2 }; await spaceRepository.CreateSpace(s); await DisplayAlert("Création de l'espace", "L'espace a bien été créé", "Ok"); await PopupNavigation.Instance.PopAsync(); }