public async Task <IActionResult> AddProject() { var categories = await _projectsService.GetAllCategories(); var deptList = new List <SelectListItem> { new SelectListItem { Text = "Select", Value = "" } }; deptList.AddRange(categories.Select(category => new SelectListItem { Text = category.CategoryName })); var partners = await _projectsService.GetAllPartners(); var partList = new List <SelectListItem> { new SelectListItem { Text = "Select", Value = "" } }; partList.AddRange(partners.Select(partner => new SelectListItem { Text = partner.Name })); var stageList = new List <SelectListItem> { new SelectListItem { Text = "Select", Value = "" } }; foreach (Stage eVal in Enum.GetValues(typeof(Stage))) { stageList.Add(new SelectListItem { Text = Enum.GetName(typeof(Stage), eVal), Value = eVal.ToString() }); } ViewBag.Stage = stageList; ViewBag.Partner = partList; ViewBag.Category = deptList; return(View(GlobalConstants.AdminAreaPath + "ProjectsAdmin/AddProject.cshtml")); }