예제 #1
0
        private async Task <List <SelectListItem> > CreateUserNamesSelectionList()
        {
            var           selectionList = new List <SelectListItem>();
            List <string> names         = await _usersHandler.GetUserNames();

            if (names != null)
            {
                foreach (string name in names)
                {
                    selectionList.Add(new SelectListItem {
                        Text = name, Value = name
                    });
                }
            }
            return(selectionList);
        }