Exemple #1
0
        public async Task <IResultModel> Select(string roleCode)
        {
            var list = await _roleUserRepository.QueryByRoleCode(roleCode);

            var result = list.Select(m => new OptionResultModel
            {
                Label = m.UserName,
                Value = m.UserId,
                Data  = new
                {
                    m.UserId,
                    m.UserCode,
                    m.UserName
                }
            }).ToList();

            return(ResultModel.Success(result));
        }