var Genremodel =storedb.genres.include ("Albums"). Single (g = = = genre); What do you mean?

Source: Internet
Author: User
G = = = Genre represents an anonymous function. That is, the single method is passed a parameter of a method type.

The G on the left represents the parameter of the method, and can have more than one, such as (g,f) = = ...,=> to the right represents the return value of the method,
It's all written: G = {return}.
The Name property can be ordered because the single method declares the format of the method type parameter, for example:
Func<student, bool>
This method type indicates that the input parameter is of type student and the return value is of type bool. Corresponds to the value of the method parameter above,
Then g for student object, G can be casually named, but here always represents the student object, such as can be written:
Single (Stu = Stu. Name = = "Genre");
Inside the single method, it can call the method we passed in, which passes in the student type parameter,
Then a bool value is returned to represent whether the object satisfies the condition that the name attribute equals "Genre", which filters the data as it traverses the student list.

var Genremodel =storedb.genres.include ("Albums"). Single (g = = = genre); What do you mean?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.