我想为我的服务注册一个实现
IQueryService<TEntity,TPrimaryKey>
。
所以我有如下代码:
IocManager.IocContainer.Register(Component.For(typeof(IQueryService<,>))
.ImplementedBy(typeof(QueryService<,>);
我想为string
作为主键的实体创建一个类似的实现,我们称之为QueryServiceString
。有没有办法将它写下来,以便温莎城堡将自动选择应该注入的课程?
IocManager.IocContainer.Register(Component.For(typeof(IQueryService<,STRING?>))
.ImplementedBy(typeof(QueryServiceString<,>)