Linq bpm get JCDept.JCDept Description

I am simply trying to get the JCDept Description field. I have this code in my data directive and it’s erroring with "‘JCDept’ does not contain a definition for ‘JCDept’ and no accessible extension method ‘JCDept’ accepting a first argument of type ‘JCDept’ could be found (are you missing a using directive or an assembly reference?)

var deptRow = (from d in Db.JCDept.Where( d => d.Company == tt.Company && d.JCDept == tt.JCDept_c)
                   select new { DeptDesc = d.Description }).FirstOrDefault();  

Why is JCDept.JCDept causing a problem or how can I just return the department description here?

1 Like
string sDepart = Db.JCDept.Where(r =>r.Company == Session.CompanyID && r.JCDept1 == YOURCOLUMN).Select( r =>r.Description ).FirstOrDefault() ?? "NotFound";

2 Likes

That worked. Thank you!