با سلام
من میخوام ازالگوی generic Repository استفاده کنم یه interface دارم به نام --Generic-Repository که متدهامو توش تعریف کردم یه کلاس GenericRepository هم دارم که متد هامو توش implement کردم حالا میخوام این دوتارو با unity به هم رجیستر کنم که به مشکل خوردم جون تایپشون جنریکه باید چیکار کنم ؟
Interface ---------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------
public interface IGenericRepository<T> where T :class
{
IQueryable<T> Get();
}
repository class -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
public class GenericRepository<T> : IGenericRepository<T> where T :class
{
private WebDB db ;
private DbSet<T> table ;


public GenericRepository(SPA_DBEntities db )
{
this.db = db;
this.table = db.Set<T>();
}
}
}

Unity config
public static class UnityConfig
{
public static void RegisterComponents()
{
var container = new UnityContainer();

// register all your components with the container here
// it is NOT necessary to register your controllers

// e.g. container.RegisterType<ITestService, TestService>();

DependencyResolver.SetResolver(new UnityDependencyResolver(container));
container.RegisterType<typeof(IGenericRepository<> ), typeof(GenericRepository<>);
}
}