コード例 #1
0
        public IEnumerable <SelectListItem> SizeList()
        {
            List <Size>           sizes    = _sizeRepository.SizeList();
            List <SelectListItem> sizeList = new List <SelectListItem>();

            foreach (var item in sizes)
            {
                sizeList.Add(new SelectListItem
                {
                    Value = item.SideID.ToString(),
                    Text  = item.size1
                });
            }
            return(sizeList);
        }