EntityFramework (및 결과 LINQ)에서 하드 코딩되지 않은 엔터티의 속성에 대해 쿼리하는 방법이 있습니까?EF를 사용하여 컴파일 할 때 알 수없는 속성에 대해 쿼리
예를 들어 검색 기능에 사용할 수있는 기능이 있습니다.
public IList<Entity> Search (string propertyName, object value) {
// something that'll do the following
return context.Set<Entity>()
.Where(x => x.propertyName == value)
.ToList()
;
}
이 일을 위해 무엇을 마쳤습니까? 나는 같은 것을 필요로하는 자신을 찾는다. 다중 필드 검색의 경우. 나는이 예제를 따르고 있는데, 나는 그들의 예제처럼 DataTables 대신에 EF를 사용하고있다. http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandcombo/defaultcs.aspx?product=grid – hardba11