using BrightGlimmer.Data.Interfaces; using BrightGlimmer.Domain; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BrightGlimmer.Data.Repositories { /* TODO: REMOVE MAYBE? */ public class StudentQueryRepository : QueryRepository { public StudentQueryRepository(BgContext context) : base(context) { } public override IQueryable Get() { return context.Students .Include(x => x.Phones) .Include(x => x.Address) .Include(x => x.AssignedCourses); } public override Student Get(Guid id) { return context.Students .Include(x => x.Phones) .Include(x => x.Address) .Include(x => x.AssignedCourses) .Single(x => x.Id == id); } public override async Task GetAsync(Guid id) { return await context.Students //.Include(x => x.Phones) //.Include(x => x.Address) //.Include(x => x.AssignedCourses) .SingleAsync(x => x.Id == id); } } }