public ActionResult AddEmployee() { CodeFirstRoleProvider roleProvider = new CodeFirstRoleProvider(); //SqlParameter appIdParam = new SqlParameter("@ApplicationId","/"); List <string> roles = roleProvider.GetAllRoles().ToList(); //context.Database.SqlQuery<string>("dbo.aspnet_Roles_GetAllRoles @ApplicationId", appIdParam).ToList<string>(); ViewBag.Roles = roles; ViewBag.Teams = teamRepository.All; return(View()); }
public static string[] GetAllRoles() { CodeFirstRoleProvider rp = new CodeFirstRoleProvider(); return(rp.GetAllRoles()); }