0

我们的 sql server 数据库中有 500 多个表。

我们希望将我们的项目更新为新一代技术。我们想使用实体框架作为 DAL 的 ORM。我们开始使用 c# -> asp.net -> mvc3 ----soa-- wcf -> (Repository Pattern) EF 开发项目的小模块。

在最初的项目中,我们几乎在实体框架中使用了 50 多个实体。性能似乎不错。但我们担心如果实体编号为 500,性能会如何。

你对我们有什么建议?

4

1 回答 1

0

I dont see any issue with 500. Although i have only test 200 so far.

Firstly you are not compelled to use MEGA contexts each time you access the DB. use bounded contexts as an example You can have 1 large context for migration pruposes. Once off. Then smaller access only contexts for everyday use.

EF 6 offers even better support in this area, making it easier to have multiple contexts. EF 6 specifications - see Multiple Contexts per Database

Then look at performance notes on EF. performance notes and more performance notes

You can also generate compile VIEWS on contexts, improving initially loads. See EF powertools ef Powertools for VS

于 2013-07-30T14:50:37.353 回答