Quantcast
Channel: The CodeFluent Entities Blog » parameters
Viewing all articles
Browse latest Browse all 6

Table-Valued Parameters: Use IEnumerable instead of an array

$
0
0

We’ve seen that CodeFluent Entities supports Table-Valued Parameters. The generated .NET method has a parameter of type array:

public static CustomerCollection LoadByIds(System.Guid[] ids)

What you may not know is that you can IEnumerable, IEnumerable<T>, DataTable or IDataReader instead of the array!

Select your parameter and set Type name to the desired type name:

After generating the code, the signature of the method is

public static SampleAdvancedTvp.CustomerCollection LoadByIds(
    System.Collections.IEnumerable ids
)

Happy Querying,
THe R&D Team.



Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images