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

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -