c# - Create List of IRepository<T> in an interface -
i have interface , want create list of repositories using generics. however, t next irepository has the type or namespace t not found. how can create property list of generic repositories?
public interface idataaccess { iunitofwork unitofwork { get; set; } ienumerable<irepository<t>> repositories { get; set; }
you need specify idataaccess<t> in order t type information propagated down repositories property. otherwise, compiler has no way determine type is.
Comments
Post a Comment