Function to Return Production Standards

I am trying to create a function that takes in Job, Asm, Op, and outputs just the ProdStd and StdFormat for that operation. This feels like it should be really easy, but I am drawing a blank on how to start it. I looked into the JobEntry method, but this seems like the wrong one. What am I missing here?

1 Like

If you’re just returning data, not changing anything, just pull directly from JobOper:

Db.JobOper
      .Where( x => x.Company == Session.CompanyID
                && x.JobNum == JobNum
                && x.AssemblySeq == AsmSeq
                && x.OprSeq == OprSeq ).
      .Select( s => new { s.ProdStandard, s.StdFormat } )
      .FirstOrDefault();
2 Likes