在 .NET 中加载 Elixir/SQLAlchemy 模型?
一个新的要求从上层下来:用我建立的令人敬畏的、有弹性的 Elixir 数据库来实施“专有业务技术”。我尝试了很多不同的方法,例如从提供的互操作 DLL 创建一个 implib(它显然不像 COM dll 那样工作),但它根本不起作用。 CPython 也不喜欢 MFC 的东西,因此所有创建 Python 库的尝试都失败了(无论如何使用 C,不确定是否可以直接从 .NET 创建 Python 库)。
唯一的优点是开发人员认为适合在他的库中提供 VBA、.NET 和 MFC Interop C++ 挂钩,因此有“一些”选择,尽管它们最终都会返回相同的框架。最好的方法是什么:
A) 使用一种语言 (Python/Elixir/SQLAlchemy) 将模型定义保存在一个地方
B) 让这个新的 .NET 访问模型,而无需诉诸脆弱的硬编码 SQL。
欢迎任何和所有建议。
A new requirement has come down from the top: implement 'proprietary business tech' with the awesome, resilient Elixir database I have set up. I've tried a lot of different things, such as creating an implib from the provided interop DLL (which apparently doesn't work like COM dlls) which didn't work at all. CPython doesn't like the MFC stuff either, so all attempts to create a Python lib have failed (using C anyway, not sure you can create a python library from .NET directly).
The only saving grace is the developer saw fit to provide VBA, .NET and MFC Interop C++ hooks into his library, so there are "some" choices, though they all ultimately lead back to the same framework. What would be the best method to:
A) Keep my model definitions in one place, in one language (Python/Elixir/SQLAlchemy)
B) Have this new .NET access the models without resorting to brittle, hard-coded SQL.
Any and all suggestions are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一天左右的深思熟虑,我尝试在 IronPython 中加载新的业务模块。虽然我真的不想将 python 解释器引入我的环境,但我认为这将是我高效完成此任务所需的粘合剂。
After a day or so of deliberation, I'm attempting to load the new business module in IronPython. Although I don't really want to introduce to python interpreters into my environment, I think that this will be the glue I need to get this done efficiently.