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

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -