コード例 #1
0
 public static IEnumerable <SelectListItem> GetProductDDList(int?itemId = null)
 {
     using (var cRepository = new CollateralRepository())
     {
         return(cRepository.GetCollateralList(false).Select(c => new SelectListItem()
         {
             Value = c.Key.ToString(), Text = c.Value, Selected = (c.Key == (itemId ?? 0))
         }));
     }
 }