/// <summary>
        /// 初始化选项列表。
        /// </summary>
        /// <returns>返回选项列表。</returns>
        protected override IEnumerable <SelectListItem> Init()
        {
            var eventTypes = _eventTypeManager.Fetch();

            foreach (var eventType in eventTypes)
            {
                yield return(new SelectListItem(eventType.Name, eventType.Id.ToString()));
            }
        }
Ejemplo n.º 2
0
 public void OnGet()
 {
     Types = _eventTypeManager.Fetch();
 }