I have implemented a search functionality using the LinqKit predicate builder. It is working fine in the local environment and when it is published to a folder the same functionality is not working. The app is published to a folder.
var outerFilter = PredicateBuilder.True<TERP_LS_BUILDING_ENTRY>();
if (codes != null)
{
outerFilter = outerFilter.And(i => codes.All(c => i.TO_UNIT_NO.Contains(c)));
}
var predicatefilter = PredicateBuilder.False<TERP_LS_BUILDING_ENTRY>();
if (search_text != null && search_text != "")
{
string searchTextLower = search_text.ToLower().Trim();
predicatefilter = predicatefilter.Or(i => i.VISITOR_NAME.Contains(searchTextLower));
predicatefilter = predicatefilter.Or(i => i.TO_UNIT_NO.Contains(searchTextLower));
}
outerFilter.And(predicatefilter);
these are the filters which I have implemented. I have referred the below link.
Predicate Builder documentation
I have tried republishing the app several times but still the same result occurs
_dbContext.Database.GetDbConnection().ConnectionString
output somewhere and confirm the deployed environment is actually going to the expected database.