문제

I need to use a custom repository inside the SharpModelBinder, the reason is that I am building a multi-tenant website which uses a custom MultiTenantRepository<> class to return data from the correct tenant.

The problem is that the SharpModelBinder uses the IRepositoryWithTypeId.

As a quick hack I have used the SharpModelBinder code and modified it to use my custom repository, however I was hoping I could find a more suitable solution.

Any ideas?

Paul

도움이 되었습니까?

해결책

I received some help from Chris Richards who has forked s#arp architechture with the required changes to support this.

His current article on mutli-tenancy will be updated with the changes in the next few days: http://www.yellowfeather.co.uk/2011/01/multi-tenancy-on-sharp-architecture/

The fork can be found here, but hopefully it will be added to the master branch soon: https://github.com/yellowfeather/Sharp-Architecture

Hope this helps somebody else.

Paul

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top