public override bool IsUserInRole(string username, string roleName) { FactorManagmentG13.Models.AccountingG13EntitiesEntities2 Context = new Models.AccountingG13EntitiesEntities2(); return(Context.Users.SingleOrDefault(p => p.UserName == username).Roles.Any(p => p.RoleDes == roleName)); }
public override string[] GetRolesForUser(string username) { FactorManagmentG13.Models.AccountingG13EntitiesEntities2 Context = new Models.AccountingG13EntitiesEntities2(); return(Context.Users.SingleOrDefault(p => p.UserName == username).Roles.Select(p => p.RoleDes).ToArray()); }