//READ //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ public virtual T FindById(object id) { try { return(dbCntx.Set <T>().Find(id)); } catch (Exception x) { throw x; } }
public override Request FindById(object id) { try { return(dbCntx.Set <Request>() .Where(w => w.Id == (decimal)id) .Include(i => i.Student) .Include(i => i.Student.Requests) .Include(i => i.Student.CandidateFields) .Include(i => i.Student.CandidateFields.Select(s => s.FieldForForeign.College)) .FirstOrDefault()); } catch (Exception x) { throw x; } }