public override string[] GetRolesForUser(string username) { var context = new AppContext(); string s = context.Users.Where(x => x.UserName == username).FirstOrDefault().Role.Name; string[] resultS = { s }; return(resultS); }
public Repository(AppContext context) { this.context = context; try { table = context.Set <T>(); } catch (Exception e) { throw e; } }
public Repository() { context = new AppContext(); table = context.Set <T>(); }
public Repository(AppContext context) { this.context = context; table = context.Set <T>(); }