Pergunta

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

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top