Entity Frame Work --Unable to create a constant value of type''
===

I have a work around for this issue, however I would appreciate it if someone could explain why this is happening and how I would design this for large datasets where my work around would not be viable.

The commented lines are the offending code and the work around is the "For loop"

Thank you in advance.

    List<WinType> _atype = db.WinTypes.Where(wt => wt.IsWin == false).ToList();
            List<WinType> _wtype = db.WinTypes.Where(wt => wt.IsWin == true).ToList();
            string test = _wtype.Where(wt => wt.Value ==0).Select(wt => wt.Description).SingleOrDefault();
            List<WinCheckDetails> wcd = db.Wins.Include("UserProfiles").Where(w => w.venueLogId == logid).Select(w => new WinCheckDetails
            {
                //awarddesc = w.atypeid.HasValue ? _atype.Where( wt=> wt.Value == w.atypeid).Select(wt => wt.Description).SingleOrDefault():string.Empty,
                //windesc = _wtype.Where(wt => wt.Value == w.typeid).Select(wt => wt.Description).Single(),
                atypeid = w.atypeid,
                typeid = w.typeid,
                WinId = w.WinId,
                other = w.other,
                posterid = w.posterid,
                confirmed = w.confirmed,
                posttime = w.posttime,
                game = w.game,
                playerid = w.UserProfile.PlayerID,
                firstname = w.UserProfile.FirstName,
                lastname = w.UserProfile.LastName,
                fullname = w.UserProfile.FirstName + " " + w.UserProfile.LastName
            }).OrderBy(o => o.game).ToList();
            foreach (WinCheckDetails wc in wcd)
            {
                wc.awarddesc = _atype.Where(wt => wt.Value == wc.atypeid).Select(wt => wt.Description).SingleOrDefault();
                wc.windesc = _wtype.Where(wt => wt.Value == wc.typeid).Select(wt => wt.Description).SingleOrDefault();
            }