简体   繁体   English

在不使用LINQ和EF的情况下从ASP.NET切换到ASP MVC

[英]Switching from ASP.NET to ASP MVC without using LINQ and EF

This is unfortunately more broad of a question than I'd really like to ask, but I'm not finding much that addresses this well online. 不幸的是,这个问题比我真正想要的问题更广泛,但我发现在网上很难解决这个问题。 The issue I have is that the version of Informix we're using is 10.5. 我遇到的问题是我们使用的Informix版本是10.5。 LINQ and EF compatibility was not added until Informix 11.10. 直到Informix 11.10才添加LINQ和EF兼容性。 Due to legacy software, we're unable to upgrade our version of Informix at this time. 由于遗留软件,我们目前无法升级我们的Informix版本。

With that in mind, is MVC still a usable approach? 考虑到这一点,MVC仍然是一种可用的方法吗? The documentation, questions, and books I've looked through all very heavily integrate EF and LINQ with MVC. 我看过的文档,问题和书籍都非常重视EF和LINQ与MVC。 If MVC is usable and advisable without those two components, what would be the recommended approach to take in their absence for handling the data approach to the application? 如果MVC在没有这两个组件的情况下是可用的和可取的,那么在处理应用程序的数据方法时,建议的方法是什么呢?

is MVC still a usable approach? MVC仍然是一种可用的方法吗?

Sure - MVC is completely agnostic of the data source. 当然 - MVC完全不了解数据源。 Linq * is still an option too, you'd just need to build your repository to return IEnumerable<T> using some other method (like ADO.NET with custom mapping or some other ORM). Linq *仍然是一个选项,您只需构建您的存储库以使用其他方法(如ADO.NET与自定义映射或其他ORM)返回IEnumerable<T> you could then use Linq in your controllers to query the data coming out of the repositories. 然后,您可以在控制器中使用Linq来查询来自存储库的数据。

* By Linq I mean Linq-to-Objects, not Linq-to-Entities * Linq我的意思是Linq-to-Objects,而不是Linq-to-Entities

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM