Click here to Skip to main content
15,794,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to be able to query the (name) parameter such as (api/data?name=prestl,accam,bcam...(25 values). This is currently what I have and the code is throwing me the following issues:

Delegate 'System.Func<Testing_Apr.database_Bd,int,bool>' does not take 1 arguments

string' does not contain a definition for 'split' and no extension method 'split' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)

var data = db.database_Bd.AsQueryable();

            if (query.startDate != null)
                data = data.Where(c => c.UploadDate >= query.startDate);

            if (!string.IsNullOrEmpty(
                var list =',');
                data = data.Where(pr => list.Any(pr2 => pr.Name.Contains(pr2)));

Any advice, would be very much appreciated.
Many thanks
Updated 25-Apr-14 0:10am

1 solution

C# is case sensitive: "split" is not the same as "Split"

var list =',');
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900