コード例 #1
0
        // GET: Gender
        public ActionResult Index()
        {
            var ListGenderViewModel = new List <GenderViewModel>();
            var ListGender          = _getGenderListQuery.GetAllGender();

            if (((List <Gender>)ListGender).Count == 0)
            {
                return(View(ListGenderViewModel));
            }

            var ListGenderEntityViewModel = MappingUtility.MappFromGenderBOToGenderViewModel(ListGender);

            return(View(ListGenderEntityViewModel));
        }
コード例 #2
0
        private void LoadGender()
        {
            var genderList = _getGenderListQuery.GetAllGender();

            ViewBag.IdGender = new SelectList(genderList, "IdGender", "GenderName");
        }