From c4a1157e5ff90f54a06d646f8d045d91dbe33a64 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 15 Jul 2022 09:35:24 +0800 Subject: [PATCH] Update Object To Object Mapping document --- docs/en/Object-To-Object-Mapping.md | 8 ++++---- docs/zh-Hans/Object-To-Object-Mapping.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en/Object-To-Object-Mapping.md b/docs/en/Object-To-Object-Mapping.md index f5ca805611..c12b260921 100644 --- a/docs/en/Object-To-Object-Mapping.md +++ b/docs/en/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(input); - _userRepository.Insert(user); + await _userRepository.InsertAsync(user); } } ```` diff --git a/docs/zh-Hans/Object-To-Object-Mapping.md b/docs/zh-Hans/Object-To-Object-Mapping.md index 402acdc4f6..62c1d17add 100644 --- a/docs/zh-Hans/Object-To-Object-Mapping.md +++ b/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(input); - _userRepository.Insert(user); + await _userRepository.InsertAsync(user); } } ````