ASP.NET core MVC how to use dropdown list
Im trying to make dropdown list in my razor view using Viewbag but its not working, Im missing something I guess public IEnumerable<SelectListItem> GetAllEmployeeForPayroll() { return GetAll().Select(emp => new SelectListItem() { Text = emp.FullName, Value = emp.Id.ToString() }); } ViewBag.employees…