コード例 #1
0
        private object GetUser()
        {
            var data = _unit.FindList <User>();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            foreach (var item in data)
            {
                var fieldItem = new
                {
                    name      = item.Name,
                    sex       = item.Sex,
                    userCount = item.Account
                };
                dictionary.Add(item.Id.ToString(), fieldItem);
            }
            return(dictionary);
        }