Get minimum value in linq query -


I am using entity framework for my DB access.

An institution is a product, and a product can have many conditions.

Here is the Term Class:

  Public Partial Class Duration {Public Short ID {get; Set; } Public Small ProductID {get; Set; } Public Byte TermSegmentID {get; Set; } Receive public byte minute {sec; Set; } Public Byte MaxTerm {get; Set; } Public Virtual Product Product {Received; Set; }}   

After selecting a list of all my products, I am trying to return a minimum price in the minimum price - this is the lowest value for all products, each One not

Can anyone help? It is proving difficult for my limited knowledge.

Thanks in advance.

What is the product has a terms property ? If so, it is very easy:

  var minMinTerm = products.SelectMany (product => product word) .minin (words = & gt; word. Termarm);   

SelectMany method A sequence of "Conv." - then you end up with a sequence of words, logically combining combinations of each rule sequence from the products.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -