コード例 #1
0
        public async Task GetAsync()
        {
            //Arrange

            var moderator = await GetRoleAsync("moderator");

            //Act

            var result = await _roleAppService.GetAsync(moderator.Id);

            //Assert

            result.Id.ShouldBe(moderator.Id);
        }
コード例 #2
0
 /// <summary>
 /// 通过Id获取角色
 /// </summary>
 /// <param name="id">Id标识</param>
 /// <returns>Task&lt;IdentityRoleDto&gt;.</returns>
 public virtual Task <IdentityRoleDto> Get(string id)
 {
     return(_appService.GetAsync(id.ToGuid()));
 }
コード例 #3
0
 public virtual Task <IdentityRoleDto> GetAsync(Guid id)
 {
     return(_roleAppService.GetAsync(id));
 }