I am trying to implement an interface class, that contains a list of objects. How can I make the list generic, so that the implementing class defines the type of list:
public interface IEntity
{
Guid EntityID { get; set; }
Guid ParentEntityID{ get; set; }
Guid RoleId { get; set; }
void SetFromEntity();
void Save();
bool Validate();
IQueryable<T> GetAll(); // That is what I would like to do
List<Guid> Search(string searchQuery);
}
public class Dealer : IEntity
{
public IQueryable<Dealer> GetAll() { }
}