Пример #1
0
        public async Task <ResponseEntity> GetByRoleGroupAsync(string column, List <dynamic> values)
        {
            try
            {
                var columns = new List <KeyValuePair <string, dynamic> >();
                foreach (string value in values)
                {
                    columns.Add(new KeyValuePair <string, dynamic>(column, value));
                }

                IEnumerable <NguoiDung> entities = await _nguoiDungRepository.GetMultiByListConditionAsync(columns);

                List <NguoiDungViewModel> modelVm = _mapper.Map <List <NguoiDungViewModel> >(entities);
                return(new ResponseEntity(StatusCodeConstants.OK, modelVm));
            }
            catch (Exception ex)
            {
                return(new ResponseEntity(StatusCodeConstants.ERROR_SERVER, ex.Message));
            }
        }