public class RepositoryBase<T> where T:class >> { >> private List<T> _list; >> protected RepositoryBase(List<T> x ) >> { >> _list = x; >> } >> } >> >> public class GuestBase<T,TList> : RepositoryBase<T> where T:class where TList:class >> { >> protected GuestBase(List<T> thing) : base(thing) >> {} >> } >> >> public class GuestRepository : GuestBase<X,Guests> >> { >> private List<Guests> _guests; >> public GuestRepository(List<X> xx, List<Guests> guests ) : base(xx) >> { >> _guests = guests; >> } >> }>
> public abstract class RepositoryBase<T> : IRepository<T> where T : class>
public interface IGuestBase<TList> where TList:class { } // then public class GuestRepository : GuestBase<X,Guests>,IGuestBase<Guests> { }BTW GuestBase is probably not a good name for that class since it is still generic