osharp
osharp copied to clipboard
添加多租户的设计与实现
您的功能请求与现有问题有关吗?请描述
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
描述您想要的需求方案
A clear and concise description of what you want to happen.
描述你考虑过的解决方案
A clear and concise description of any alternative solutions or features you've considered.
附加上下文,比如截图
Add any other context or screenshots about the feature request here.
其实大多数的系统并不需要有多租户功能,如果框架为了兼容多租户功能而设计一个开关,用来关闭和启动多租户功能,个人感觉这种设计对于不需要多租户功能的系统,其实并不友好,框架会有很多判断和无效的代码,不利于框架理解和使用。当初选择OSharp,没有选择其它框架,就是因为它没有多租户功能,代码纯净。
关于多租户的功能,应该设计成一个独立的模块,单独实现多租户功能,当不需要多租户功能时加载另外的模块。这种设计比混合代码,然后使用配置进行判断的方式会比较好。
@AlexGeller 我也是这么考虑的,引入多租户会引入更多的复杂度,需要一个良好的设计