开发者

S#arp Architecture + SharpModelBinder with custom repository

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 s开发者_高级运维olution.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜