aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Services
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-02-03 12:30:18 +0200
committertranstrike <transtrike@gmail.com>2021-02-03 12:30:18 +0200
commit8174d2b35c1d3fa90df8b9cb4a75bb3381ea5e39 (patch)
tree8d7be6369030ab512d3e475518de52d3a956926a /src/DevHive.Services
parent81b3fc43a900857443c3c763f52e0a54719c2fae (diff)
downloadDevHive-8174d2b35c1d3fa90df8b9cb4a75bb3381ea5e39.tar
DevHive-8174d2b35c1d3fa90df8b9cb4a75bb3381ea5e39.tar.gz
DevHive-8174d2b35c1d3fa90df8b9cb4a75bb3381ea5e39.zip
Added Include in the Queries
Diffstat (limited to 'src/DevHive.Services')
-rw-r--r--src/DevHive.Services/Services/UserService.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/DevHive.Services/Services/UserService.cs b/src/DevHive.Services/Services/UserService.cs
index 09b56c1..40e894d 100644
--- a/src/DevHive.Services/Services/UserService.cs
+++ b/src/DevHive.Services/Services/UserService.cs
@@ -85,8 +85,8 @@ namespace DevHive.Services.Services
#region Read
public async Task<UserServiceModel> GetUserById(Guid id)
{
- User user = await this._userRepository.GetByIdAsync(id)
- ?? throw new ArgumentException("User does not exist!");
+ User user = await this._userRepository.GetByIdAsync(id) ??
+ throw new ArgumentException("User does not exist!");
return this._userMapper.Map<UserServiceModel>(user);
}
@@ -116,8 +116,8 @@ namespace DevHive.Services.Services
if (!successful)
throw new InvalidOperationException("Unable to edit user!");
- return this._userMapper.Map<UserServiceModel>(
- await this._userRepository.GetByIdAsync(user.Id));
+ User newUser = await this._userRepository.GetByIdAsync(user.Id);
+ return this._userMapper.Map<UserServiceModel>(newUser);
}
#endregion