0
Entity Framework를 사용하고 있으며 변경된 속성이 매핑되어있는 경우 속성을 업데이트하려는 속성 변경 이벤트를 트리거하고 있습니다.Entity Framework - 속성이 매핑되었는지 확인
protected void FooPropertyChanged(object sender, PropertyChangedEventArgs e)
{
var notMappedArray = typeof(Foo).GetProperty(e.PropertyName).GetCustomAttributes(typeof(NotMappedAttribute), false); // I thought this might return null if the property did not have the attribute. It does not.
//if (notMappedArray == null)
UnitOfWork.Value.GetRepository<Foo>().Update(MyFoo);
}
이 이벤트로 보낸 속성이 엔티티 프레임 워크에 매핑되어 있는지 확인하는 가장 좋은 방법은 무엇입니까?
편집 : this question을 보았습니다. 그러나 그 대답은 조금 지나치게 빠져 나가는 것처럼 보이고, 내가 필요한 것을하지는 않습니다.