Preventing .NET Core Nested Project References

前端 未结 2 1617
天涯浪人
天涯浪人 2020-12-20 20:52

Given the situation that I have a .NET Core 2.0 Application I also have a Web assembly, a Business assembly, and a DataAccess assembly.

I don\'t want the Web assembl

2条回答
  •  我在风中等你
    2020-12-20 21:14

    This is why you use interfaces, not concrete objects for injection. You shouldn't be leaking references to DBContext outside of your DataAccess assembly. This means you have too much coupling to the underlying database in the higher layers.

提交回复
热议问题