具有许多(50K +)表的实体框架 [英] Entity Framework with lots (50K+) tables

查看:165
本文介绍了具有许多(50K +)表的实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用具有超过50,000个表的数据库的实体框架。我只想在这些表的一小部分上创建实体(小于10)。当我使用向导或服务器资源管理器添加表时,Visual Studio似乎无法处理大量的表。看起来好像树视图限制了很多项目。

I would like to use the Entity Framework against a database with well over 50,000 tables. I only want to create entities on a small portion of these tables (less than 10). When I go to add tables using the wizard or server explorer, Visual Studio seems to not be able to handle that large amount of tables. It appears as if the tree view limits out with that many items.

如果这是唯一的选择,我愿意手动创建映射。

I'm willing to create the mapping manually if that is the only option.


  1. 有没有办法过滤表,只找到我需要的,所以我可以拖放?

  2. 如何手动创建实体,然后将其映射到物理表?

注意:如果LinqToSql将以某种方式工作对于这个更好,我对这个项目也是开放的。我希望实体框架。

Note: If LinqToSql would somehow work better for this, I'm open to that as well for this project. I would prefer Entity Framework however.

推荐答案

尝试这样做:在数据库中创建一个只能访问10个表的登录名。然后使用该登录名连接数据库,以便设计人员使用。

Try this: create a login in the database which only has access to the 10 tables. Then use that login to connect to the database for the purposes of the designer.

这篇关于具有许多(50K +)表的实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆