1、新建UserDto.cs
- public class UserDto : BaseDto
- {
- private string userName;
- ///
- /// 用户名
- ///
- public string UserName
- {
- get { return userName; }
- set { userName = value;OnPropertyChanged(); }
- }
- private string account;
- ///
- /// 账户
- ///
- public string Account
- {
- get { return account; }
- set { account = value; OnPropertyChanged(); }
- }
- private string password;
- ///
- /// 密码
- ///
- public string Password
- {
- get { return password; }
- set { password = value; OnPropertyChanged(); }
- }
-
- }
2、新增ILoginService接口
- public interface ILoginService
- {
- Task
LoginAsync(string Account, string Password) ; - Task
RegisterAsync(UserDto userDto) ; -
- }
3、实现LoginService接口