Skip to content

Commit

Permalink
Merge pull request #7 from JSMontoya/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jusemon authored Jun 4, 2019
2 parents 9a7af10 + b8d2390 commit 4d4f815
Show file tree
Hide file tree
Showing 7 changed files with 680 additions and 558 deletions.
2 changes: 1 addition & 1 deletion 1.Domain/OG.Zoo.Domain.Services/Generics/BaseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public virtual async Task<IEnumerable<TEntity>> GetAll()
/// <param name="pageIndex">The page.</param>
/// <param name="pageSize">The items per page.</param>
/// <returns></returns>
public async Task<Paginated<TEntity>> GetAll(int pageIndex, int pageSize, string sortBy, string direction)
public virtual async Task<Paginated<TEntity>> GetAll(int pageIndex, int pageSize, string sortBy, string direction)
{
return await this.repository.GetAll(pageIndex, pageSize, sortBy, direction);
}
Expand Down
15 changes: 3 additions & 12 deletions 1.Domain/OG.Zoo.Domain.Services/OG.Zoo.Domain.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,14 @@

<ItemGroup>
<PackageReference Include="FluentValidation" Version="8.1.3" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.1.1" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="5.2.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\3.Infraestructure\OG.Zoo.Infraestructure.Utils\OG.Zoo.Infraestructure.Utils.csproj" />
<ProjectReference Include="..\OG.Zoo.Domain.Interfaces\OG.Zoo.Domain.Interfaces.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore.WebUtilities">
<HintPath>..\..\..\..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.webutilities\2.1.1\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Tokens">
<HintPath>..\..\..\..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.identitymodel.tokens\5.2.0\lib\netstandard1.4\Microsoft.IdentityModel.Tokens.dll</HintPath>
</Reference>
<Reference Include="System.IdentityModel.Tokens.Jwt">
<HintPath>..\..\..\..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\system.identitymodel.tokens.jwt\5.2.0\lib\netstandard1.4\System.IdentityModel.Tokens.Jwt.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
16 changes: 16 additions & 0 deletions 1.Domain/OG.Zoo.Domain.Services/Security/User/UserService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace OG.Zoo.Domain.Services.Security.User
{
using Entities.Generics;
using Entities.Security;
using Infraestructure.Utils.Exceptions;
using Infraestructure.Utils.Injectables.Email;
Expand Down Expand Up @@ -175,6 +176,21 @@ public override async Task<IEnumerable<User>> GetAll()
return results.Select(r => { r.Password = string.Empty; return r; });
}

/// <summary>
/// Gets all.
/// </summary>
/// <param name="pageIndex">The page.</param>
/// <param name="pageSize">The items per page.</param>
/// <param name="sortBy"></param>
/// <param name="direction"></param>
/// <returns></returns>
public override async Task<Paginated<User>> GetAll(int pageIndex, int pageSize, string sortBy, string direction)
{
var results = await this.userRepository.GetAll(pageIndex, pageSize, sortBy, direction);
results.Items = results.Items.Select(r => { r.Password = string.Empty; return r; });
return results;
}

/// <summary>
/// Gets the token.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<ItemGroup>
<PackageReference Include="LightInject.Microsoft.AspNetCore.Hosting" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 4d4f815

Please sign in to comment.