Hi All,
How can I passed array companies id into the .Where highlight orange query below:-
var companies = companies.Where(c=>!c.Id.Equals(0)).Select(c => c.Id).Distinct().ToList(); RequestEntityDataSource.Where = $"it.Company.Id IN (String.Join(",",{companies} ))&& " + $"(it.Status = {(int)Status.Saved} || it.status = {(int)Status.Ordered}) && " + "(it.Id = @IdFilter || @IdFilter = -1) &&" + "(it.CreatedBy LIKE '%' + @createdByFilter + '%' || @createdByFilter is null) &&" + "(it.PtName LIKE '%' + @pNameFilter + '%' || @PNameFilter is null) &&" + "(it.EndUser LIKE '%' + @endUserFilter + '%' || @endUserFilter is null) &&" + "(it.Name LIKE '%' + @NameFilter + '%' || @NameFilter is null)";Error:
The query syntax is not valid. Near term ',', line 6, column 23.
Please advise.
Thanks
Regards,
Micheale