Hello guys!
I'm trying to do something like this with reflection and no luck...
this.EFMODELINSTANCE.Entry((PERSON)instance).Collection(d => d.somePersonProperty).Query().Count();
what i'm trying to achieve is getting the count of the navigation property items in an property like
Person -> Address
I want to count all the addresses for an instance of a Person.
So, i want to make a generic method that receives Object (an instance of EF) and a string with the name of the property to count.
Can you help me on this? :)
Thanks in advance!