新增获取角色列表接口
This commit is contained in:
@@ -114,5 +114,11 @@ namespace Apimanager_backend.Services
|
||||
return await context.Users.CountAsync();
|
||||
}
|
||||
#endregion
|
||||
#region 获取角色列表
|
||||
public async Task<List<UserRole>> GetRolesAsync()
|
||||
{
|
||||
return await context.UserRoles.Where(x => true).Take(10).ToListAsync();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Apimanager_backend.Dtos;
|
||||
using Apimanager_backend.Models;
|
||||
|
||||
namespace Apimanager_backend.Services
|
||||
{
|
||||
@@ -46,5 +47,10 @@ namespace Apimanager_backend.Services
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<int> UserCountAsync();
|
||||
/// <summary>
|
||||
/// 获取角色列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<UserRole>> GetRolesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user