I have an object that contains some ICollection type properties
So basically the class looks like this:
Class Employee {
public ICollection<Address> Addresses {get;set;}
public ICollection<Performance> Performances {get; set;}
}
The problem is get property names of type ICollection, inside of Generic class, by using reflection.
My Generic Class is
Class CRUD<TEntity> {
public object Get() {
var properties = typeof(TEntity).GetProperties().Where(m=m.GetType() == typeof(ICollection ) ...
}
But it is not working.
How can I get a property here?