public static void DDLDepartment(Controller _controller, string key = "ID", string value = "Title", object selected = null) { using (var objBLL = new MasterBLL()) { _controller.ViewBag.Departments = new SelectList(objBLL.GetDepartments(), key, value, selected); } }