mirror of https://github.com/abpframework/abp.git
36 changed files with 652 additions and 9 deletions
@ -0,0 +1,19 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("Volo.Abp.Identity.Application.Contracts")] |
|||
[assembly: AssemblyTrademark("")] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|||
[assembly: Guid("c714a3ab-8402-4dc2-b120-accb2e29bd8f")] |
|||
@ -0,0 +1,20 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> |
|||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
|||
</PropertyGroup> |
|||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> |
|||
<PropertyGroup Label="Globals"> |
|||
<ProjectGuid>c714a3ab-8402-4dc2-b120-accb2e29bd8f</ProjectGuid> |
|||
<RootNamespace> |
|||
</RootNamespace> |
|||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> |
|||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> |
|||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
</PropertyGroup> |
|||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" /> |
|||
</Project> |
|||
@ -0,0 +1,14 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
using Volo.Abp.Application.Services.Dtos; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
{ |
|||
public interface IUserAppService : IApplicationService |
|||
{ |
|||
Task<ListResultDto<IdentityUserDto>> GetAll(); |
|||
|
|||
Task<IdentityUserDto> Get(Guid id); |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
using Volo.Abp.Application.Services.Dtos; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
{ |
|||
public class IdentityUserDto : EntityDto |
|||
{ |
|||
public string UserName { get; set; } |
|||
|
|||
public string Email { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
{ |
|||
"version": "1.0.0-*", |
|||
|
|||
"dependencies": { |
|||
"Volo.Abp": "1.0.0-*" |
|||
}, |
|||
|
|||
"frameworks": { |
|||
"netstandard1.6": { |
|||
"imports": "dnxcore50" |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("Volo.Abp.Identity.Application")] |
|||
[assembly: AssemblyTrademark("")] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|||
[assembly: Guid("54592671-9cb6-48ae-9ae0-84cd016e87ff")] |
|||
@ -0,0 +1,20 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> |
|||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
|||
</PropertyGroup> |
|||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> |
|||
<PropertyGroup Label="Globals"> |
|||
<ProjectGuid>54592671-9cb6-48ae-9ae0-84cd016e87ff</ProjectGuid> |
|||
<RootNamespace> |
|||
</RootNamespace> |
|||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> |
|||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> |
|||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
</PropertyGroup> |
|||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" /> |
|||
</Project> |
|||
@ -0,0 +1,14 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
{ |
|||
[DependsOn(typeof(AbpIdentityModule))] |
|||
public class AbpIdentityApplicationModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddAssemblyOf<AbpIdentityApplicationModule>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
using System; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services.Dtos; |
|||
using Volo.Abp.Uow; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
{ |
|||
public class UserAppService : IUserAppService |
|||
{ |
|||
private readonly IIdentityUserRepository _userRepository; |
|||
private readonly IUnitOfWorkManager _unitOfWorkManager; |
|||
|
|||
public UserAppService( |
|||
IIdentityUserRepository userRepository, |
|||
IUnitOfWorkManager unitOfWorkManager) |
|||
{ |
|||
_userRepository = userRepository; |
|||
_unitOfWorkManager = unitOfWorkManager; |
|||
} |
|||
|
|||
public async Task<ListResultDto<IdentityUserDto>> GetAll() |
|||
{ |
|||
//Use conventional unit of work for application services when it's available!
|
|||
using (var unitOfWork = _unitOfWorkManager.Begin()) |
|||
{ |
|||
var users = (await _userRepository.GetListAsync()) |
|||
.Select(u => new IdentityUserDto |
|||
{ |
|||
Id = u.Id, |
|||
Email = u.Email, |
|||
UserName = u.UserName |
|||
}) |
|||
.ToList(); |
|||
|
|||
await unitOfWork.CompleteAsync(); |
|||
|
|||
return new ListResultDto<IdentityUserDto>(users); |
|||
} |
|||
} |
|||
|
|||
public async Task<IdentityUserDto> Get(Guid id) |
|||
{ |
|||
//Use conventional unit of work for application services when it's available!
|
|||
using (var unitOfWork = _unitOfWorkManager.Begin()) |
|||
{ |
|||
var user = await _userRepository.GetAsync(id); |
|||
|
|||
await unitOfWork.CompleteAsync(); |
|||
|
|||
return new IdentityUserDto |
|||
{ |
|||
Id = user.Id, |
|||
UserName = user.UserName, |
|||
Email = user.Email |
|||
}; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
{ |
|||
"version": "1.0.0-*", |
|||
|
|||
"dependencies": { |
|||
"Volo.Abp.Identity": "1.0.0-*", |
|||
"Volo.Abp.Identity.Application.Contracts": "1.0.0-*" |
|||
}, |
|||
|
|||
"frameworks": { |
|||
"netstandard1.6": { |
|||
"imports": "dnxcore50" |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.AspNetCore.Hosting; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Logging; |
|||
using Volo.Abp.AspNetCore.Modularity; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.Identity.EntityFrameworkCore; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.Identity.HttpApi.Host |
|||
{ |
|||
[DependsOn(typeof(AbpIdentityHttpApiModule), typeof(AbpIdentityEntityFrameworkCoreModule))] |
|||
public class AbpIdentityHttpApiHostModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
var hostingEnvironment = services.GetSingletonInstance<IHostingEnvironment>(); |
|||
var configuration = BuildConfiguration(hostingEnvironment); |
|||
|
|||
services.Configure<DbConnectionOptions>(configuration); |
|||
|
|||
services.Configure<AbpDbContextOptions>(options => |
|||
{ |
|||
//Configures all dbcontextes to use Sql Server with calculated connection string
|
|||
options.Configure(context => |
|||
{ |
|||
context.DbContextOptions.UseSqlServer(context.ConnectionString); |
|||
}); |
|||
}); |
|||
|
|||
services.AddMvc(); |
|||
services.AddAssemblyOf<AbpIdentityHttpApiHostModule>(); |
|||
} |
|||
|
|||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
var app = context.GetApplicationBuilder(); |
|||
|
|||
context.GetLoggerFactory().AddConsole().AddDebug(); |
|||
|
|||
if (context.GetEnvironment().IsDevelopment()) |
|||
{ |
|||
app.UseDeveloperExceptionPage(); |
|||
} |
|||
|
|||
app.UseMvc(); //No need to a default route
|
|||
} |
|||
|
|||
private static IConfigurationRoot BuildConfiguration(IHostingEnvironment env) |
|||
{ |
|||
var builder = new ConfigurationBuilder() |
|||
.SetBasePath(env.ContentRootPath) |
|||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) |
|||
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true); |
|||
|
|||
return builder.Build(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
using System.IO; |
|||
using Microsoft.AspNetCore.Hosting; |
|||
|
|||
namespace Volo.Abp.Identity.HttpApi.Host |
|||
{ |
|||
public class Program |
|||
{ |
|||
public static void Main(string[] args) |
|||
{ |
|||
var host = new WebHostBuilder() |
|||
.UseKestrel() |
|||
.UseContentRoot(Directory.GetCurrentDirectory()) |
|||
.UseIISIntegration() |
|||
.UseStartup<Startup>() |
|||
.Build(); |
|||
|
|||
host.Run(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
{ |
|||
"iisSettings": { |
|||
"windowsAuthentication": false, |
|||
"anonymousAuthentication": true, |
|||
"iisExpress": { |
|||
"applicationUrl": "http://localhost:63290/", |
|||
"sslPort": 0 |
|||
} |
|||
}, |
|||
"profiles": { |
|||
"IIS Express": { |
|||
"commandName": "IISExpress", |
|||
"launchBrowser": true, |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
}, |
|||
"Volo.Abp.Identity.HttpApi.Host": { |
|||
"commandName": "Project", |
|||
"launchBrowser": true, |
|||
"launchUrl": "http://localhost:5000", |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.AspNetCore.Hosting; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Logging; |
|||
|
|||
namespace Volo.Abp.Identity.HttpApi.Host |
|||
{ |
|||
public class Startup |
|||
{ |
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
|||
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
|
|||
public void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddApplication<AbpIdentityHttpApiHostModule>(); |
|||
} |
|||
|
|||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
|||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) |
|||
{ |
|||
app.InitializeApplication(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> |
|||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
|||
</PropertyGroup> |
|||
|
|||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> |
|||
<PropertyGroup Label="Globals"> |
|||
<ProjectGuid>eb902d57-c047-4cdf-828b-fdc204ac7398</ProjectGuid> |
|||
<RootNamespace>Volo.Abp.Identity.HttpApi.Host</RootNamespace> |
|||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> |
|||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> |
|||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> |
|||
</PropertyGroup> |
|||
|
|||
<PropertyGroup> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<DnxInvisibleContent Include="bower.json" /> |
|||
<DnxInvisibleContent Include=".bowerrc" /> |
|||
</ItemGroup> |
|||
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" /> |
|||
</Project> |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"ConnectionStrings": { |
|||
"Default": "Server=192.168.1.36;Database=AbpDesk;User=sa;Password=123qwe;" |
|||
} |
|||
} |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"ConnectionStrings": { |
|||
"Default": "Server=localhost;Database=AbpDesk;Trusted_Connection=True;" |
|||
} |
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
{ |
|||
"dependencies": { |
|||
"Microsoft.NETCore.App": { |
|||
"version": "1.1.0", |
|||
"type": "platform" |
|||
}, |
|||
"Microsoft.AspNetCore.Diagnostics": "1.1.0", |
|||
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0", |
|||
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0", |
|||
"Microsoft.Extensions.Logging.Console": "1.1.0", |
|||
"Microsoft.Extensions.Logging.Debug": "1.1.0", |
|||
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", |
|||
"Microsoft.Extensions.Configuration.Json": "1.1.0", |
|||
|
|||
"Microsoft.EntityFrameworkCore.Tools": { |
|||
"type": "build", |
|||
"version": "1.1.0-preview4-final" |
|||
}, |
|||
|
|||
"Volo.Abp.Identity.EntityFrameworkCore": "1.0.0-*", |
|||
"Volo.Abp.Identity.HttpApi": "1.0.0-*" |
|||
}, |
|||
|
|||
"tools": { |
|||
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final", |
|||
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final" |
|||
}, |
|||
|
|||
"frameworks": { |
|||
"netcoreapp1.1": { |
|||
"imports": [ |
|||
"dotnet5.6", |
|||
"portable-net45+win8" |
|||
] |
|||
} |
|||
}, |
|||
|
|||
"buildOptions": { |
|||
"emitEntryPoint": true, |
|||
"preserveCompilationContext": true |
|||
}, |
|||
|
|||
"runtimeOptions": { |
|||
"configProperties": { |
|||
"System.GC.Server": true |
|||
} |
|||
}, |
|||
|
|||
"publishOptions": { |
|||
"include": [ |
|||
"wwwroot", |
|||
"web.config", |
|||
"appsettings.json" |
|||
] |
|||
}, |
|||
|
|||
"scripts": { |
|||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<configuration> |
|||
|
|||
<!-- |
|||
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380 |
|||
--> |
|||
|
|||
<system.webServer> |
|||
<handlers> |
|||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> |
|||
</handlers> |
|||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/> |
|||
</system.webServer> |
|||
</configuration> |
|||
@ -0,0 +1,19 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("Volo.Abp.Identity.HttpApi")] |
|||
[assembly: AssemblyTrademark("")] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|||
[assembly: Guid("57fca6cb-9d99-411e-8abf-20acfbd61d61")] |
|||
@ -0,0 +1,20 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> |
|||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
|||
</PropertyGroup> |
|||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> |
|||
<PropertyGroup Label="Globals"> |
|||
<ProjectGuid>57fca6cb-9d99-411e-8abf-20acfbd61d61</ProjectGuid> |
|||
<RootNamespace> |
|||
</RootNamespace> |
|||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> |
|||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> |
|||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
</PropertyGroup> |
|||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" /> |
|||
</Project> |
|||
@ -0,0 +1,15 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
{ |
|||
[DependsOn(typeof(AbpIdentityApplicationModule), typeof(AbpAspNetCoreMvcModule))] |
|||
public class AbpIdentityHttpApiModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddAssemblyOf<AbpIdentityApplicationModule>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.Application.Services.Dtos; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
{ |
|||
[Route("api/identity/users")] |
|||
public class IdentityUsersController : AbpController |
|||
{ |
|||
private readonly IUserAppService _userAppService; |
|||
|
|||
public IdentityUsersController(IUserAppService userAppService) |
|||
{ |
|||
_userAppService = userAppService; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("")] |
|||
public Task<ListResultDto<IdentityUserDto>> GetAll() |
|||
{ |
|||
return _userAppService.GetAll(); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<IdentityUserDto> Get(Guid id) |
|||
{ |
|||
return _userAppService.Get(id); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
{ |
|||
"version": "1.0.0-*", |
|||
|
|||
"dependencies": { |
|||
"Volo.Abp.AspNetCore.Mvc": "1.0.0-*", |
|||
"Volo.Abp.Identity.Application": "1.0.0-*" |
|||
}, |
|||
|
|||
"frameworks": { |
|||
"netstandard1.6": { |
|||
"imports": "dnxcore50" |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue