As per the comment to
Is it also possible to support IEnumerable as an input parameter where T is a primitive type?
For example I am trying to implement the “GROUP_CONCAT” function for MSSQL (To simulate the functionality of GROUP_CONCAT in MYSQL) as a custom stored procedure. (See:
I have the stored procedure up and running but I cannot call it via a DbFunction because IEnumreable is currently not supported as a paramter.
The signature for this method would look look like this:
public static string GroupConcat(IEnumerable<string> collection, string separator = ", ")
An the usage scenario would be this.
from blog context.Set()
select new BlogDto
Name = blog.Title,
Tags = CustomDbFunctions.GroupConcat(blog .Tags.Select(x => x.Name))
This should return the following:
Name, | Tags
My first blog, | Csharp, Linq, Ef
My second blog | PHP, Ruby
This would basically be the same like DBFunctions.StandardDeviation(IEnumerable ..) where I also have a sequence of inputs and the functions returns an aggregated value.