Browse Source
Merge pull request #13319 from abpframework/auto-merge/rel-5-3/1191
pull/13330/head
maliming
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
8 deletions
-
docs/en/Object-To-Object-Mapping.md
-
docs/zh-Hans/Object-To-Object-Mapping.md
|
|
|
@ -12,7 +12,7 @@ public class UserAppService : ApplicationService |
|
|
|
_userRepository = userRepository; |
|
|
|
} |
|
|
|
|
|
|
|
public void CreateUser(CreateUserInput input) |
|
|
|
public async Task CreateUser(CreateUserInput input) |
|
|
|
{ |
|
|
|
//Manually creating a User object from the CreateUserInput object |
|
|
|
var user = new User |
|
|
|
@ -23,7 +23,7 @@ public class UserAppService : ApplicationService |
|
|
|
Password = input.Password |
|
|
|
}; |
|
|
|
|
|
|
|
_userRepository.Insert(user); |
|
|
|
await _userRepository.InsertAsync(user); |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
@ -46,12 +46,12 @@ public class UserAppService : ApplicationService |
|
|
|
_userRepository = userRepository; |
|
|
|
} |
|
|
|
|
|
|
|
public void CreateUser(CreateUserInput input) |
|
|
|
public async Task CreateUser(CreateUserInput input) |
|
|
|
{ |
|
|
|
//Automatically creating a new User object using the CreateUserInput object |
|
|
|
var user = ObjectMapper.Map<CreateUserInput, User>(input); |
|
|
|
|
|
|
|
_userRepository.Insert(user); |
|
|
|
await _userRepository.InsertAsync(user); |
|
|
|
} |
|
|
|
} |
|
|
|
```` |
|
|
|
|
|
|
|
@ -12,7 +12,7 @@ public class UserAppService : ApplicationService |
|
|
|
_userRepository = userRepository; |
|
|
|
} |
|
|
|
|
|
|
|
public void CreateUser(CreateUserInput input) |
|
|
|
public async Task CreateUser(CreateUserInput input) |
|
|
|
{ |
|
|
|
//Manually creating a User object from the CreateUserInput object |
|
|
|
var user = new User |
|
|
|
@ -23,7 +23,7 @@ public class UserAppService : ApplicationService |
|
|
|
Password = input.Password |
|
|
|
}; |
|
|
|
|
|
|
|
_userRepository.Insert(user); |
|
|
|
await _userRepository.InsertAsync(user); |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
@ -46,12 +46,12 @@ public class UserAppService : ApplicationService |
|
|
|
_userRepository = userRepository; |
|
|
|
} |
|
|
|
|
|
|
|
public void CreateUser(CreateUserInput input) |
|
|
|
public async Task CreateUser(CreateUserInput input) |
|
|
|
{ |
|
|
|
//Automatically creating a new User object using the CreateUserInput object |
|
|
|
var user = ObjectMapper.Map<CreateUserInput, User>(input); |
|
|
|
|
|
|
|
_userRepository.Insert(user); |
|
|
|
await _userRepository.InsertAsync(user); |
|
|
|
} |
|
|
|
} |
|
|
|
```` |
|
|
|
|