Skip to content

Commit

Permalink
debug database.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rockiez committed Jan 16, 2019
1 parent efe1168 commit 9dde19f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions UploadGui/Services/DBApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace UploadGui.Services
{
class UsersDBApiService : LinqToDB.Data.DataConnection
{

public UsersDBApiService() : base("LocalDB") { }
public ITable<User> Users => GetTable<User>();

Expand Down
18 changes: 16 additions & 2 deletions UploadGui/ViewModels/UserAuthenticateViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ public UserAuthenticateViewModel()
LoginButtonEnable = true;
NextButtonEnable = false;

UserList = UsersDBApiService.All();
try
{
UserList = UsersDBApiService.All();
}
catch (Exception)
{
}

//command binding

Expand Down Expand Up @@ -212,7 +218,15 @@ await UserAuthenticateApiService.Login(new LoginRequest()
});
LoginButtonEnable = true;

UsersDBApiService.InsertNewUser(new User() {Email = Username, Password = password});
try
{
UsersDBApiService.InsertNewUser(new User() { Email = Username, Password = password });

}
catch (Exception)
{

}

}
else
Expand Down

0 comments on commit 9dde19f

Please sign in to comment.