The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Eduardo Gomez
3,426
Reputation points
I am trying to insert data into a SQL Azure database but is telling me that the service is not available
[AddINotifyPropertyChangedInterface]
public class Users {
public string Id { get; set; }
[OnChangedMethod(nameof(OnPropertyChanged))]
public string Email { get; set; }
[OnChangedMethod(nameof(OnPropertyChanged))]
public string Password { get; set; }
[JsonIgnore]
public Action OnAnyPropertiesChanged { get; set; }
private void OnPropertyChanged() {
OnAnyPropertiesChanged?.Invoke();
}
[AddINotifyPropertyChangedInterface]
public class LoginPageViewModel {
public ICommand OpenRegisterPopupCommand { get; set; }
public ICommand Register { get; set; }
public ICommand Login { get; set; }
public Users Users { get; set; }
public bool IsRegisterAllowed { get; set; }
public bool IsPopUpOpen { get; set; }
public LoginPageViewModel() {
Users = new Users {
OnAnyPropertiesChanged = () => {
(Login as Command).ChangeCanExecute();
(Register as Command).ChangeCanExecute();
}
};
Login = new Command(LoginAction, CanPreformAction);
Register = new Command(RegisterAction, CanPreformAction);
OpenRegisterPopupCommand = new Command(() => {
IsPopUpOpen = true;
});
}
private bool CanPreformAction(object arg) {
return Users != null && !string.IsNullOrEmpty(Users.Email) && !string.IsNullOrEmpty(Users.Password);
}
private async void RegisterAction(object obj) {
//Inserting, but the service is not available
await App.client.GetTable<Users>().InsertAsync(Users);
}
I do not have an ASP client, because I did everything in the portal, and I am trying to change my backend from firebase to aszure
Sign in to answer