//temporary method public List <StudentCreditLogModel> GetUserCreditLog(string userid) { using (ChillLearnContext context = new ChillLearnContext()) { var query = from logs in context.StudentCreditLogs join c in context.Classes on logs.ClassID equals c.ClassID where logs.UserID == userid select new StudentCreditLogModel { ClassName = c.Title, CreditsUsed = logs.CreditsUsed, LogType = logs.LogType, CreationDate = logs.CreationDate }; return(query.ToList()); } }
public TeacherRepository(ChillLearnContext context) { this.context = context; }
public StudentRepository(ChillLearnContext context) { this.context = context; }
public Repository(ChillLearnContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }