C# Statement shows no results but results contain 3 values; why?

Hello -

I am new to LINQPad and just purchased my upgraded license. I went to run the following statement and it returns no results.

EPDMReferenceToolLicenseManagements.Where(epdmrtlm => epdmrtlm.DataField_Company == "Trident");

I know there is data in there that equals that value so I updated the code to be:

var res = EPDMReferenceToolLicenseManagements.Where(epdmrtlm => epdmrtlm.DataField_Company == "Trident"); Console.Write(res.Count());

The result is a value of 3, which is correct. Why does the data not show after the first statement? What am I missing?

Comments

  • You need to add .Dump() to the end of your statement.

    Google for Linq and Deferred Execution if you want to know more.
  • @sgmoore That resolved the problem and I have started the research on your recommendation, thank you!!!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!