StartsWith
,
EndsWith
ve
Contains
ile bir dize özelliğini filtrelemek için tip
Expression<Func<T, bool>>
ifadesini oluşturmak için tip
Expression<Func<T, string>
bir ifadeyi geçen bir yöntem oluşturmak istiyorum
bu ifadeler gibi yöntemleri:<Func <T, string>>
.Where(e => e.MiProperty.ToUpper().StartsWith("ABC"));
.Where(e => e.MiProperty.ToUpper().EndsWith("XYZ"));
.Where(e => e.MiProperty.ToUpper().Contains("MNO"));
yöntem aşağıdaki gibi görünmelidir:
public Expression<Func<T, bool>> AddFilterToStringProperty<T>(Expresssion<Func<T, string>> pMyExpression, string pFilter, FilterType pFiltertype)
Filtertype sözü operasyonlar (StartsWith
, EndsWith
, Contains
)
Bunun için gidin. Ne denediğini bize bildirin, eğer işe yaramazsa, yardım etmekten mutluluk duyarız. – drdwilcox