Case-insensitive table and property names in Entity Framework 7
With reference to the answer above, no. There is no way to further load case sensitivity checks at an even lower level. You will need to accomplish exactly what this person did:
How to make ef core 2 not case sensitive?
Here is an example of the latest LINQ syntax.
var tickerObj = _unitOfWork.GetRepository<CurrencyPair>()
.GetQueryable()
.SingleOrDefault(cp => string.Concat(
cp.PartialCurrencyPairs.FirstOrDefault(pcp => pcp.IsMain).Currency.Abbrv,
cp.PartialCurrencyPairs.FirstOrDefault(pcp => !pcp.IsMain).Currency.Abbrv)
.Equals(ticker, StringComparison.InvariantCultureIgnoreCase)
&& cp.CurrencySource.Abbreviation.Equals(exchangeAbbrv, StringComparison.InvariantCultureIgnoreCase));
Focus on the SingleOrDefault () segment:
cp.CurrencySource.Abbreviation.Equals(exchangeAbbrv, StringComparison.InvariantCultureIgnoreCase)
source
share