public int GetRoleId(string name) { using (RoleDefinitionDataProvider roleDP = new RoleDefinitionDataProvider()) { return(roleDP.GetRoleId(name)); } }