What is the correct way to use Unit of Work/Repositories within the business layer?

后端 未结 2 1025
别那么骄傲
别那么骄傲 2021-01-05 18:23

Having built a small application using the Unit of Work/Repository pattern, I am struggling to understand how to use this properly within my business layer. My application h

2条回答
  •  时光取名叫无心
    2021-01-05 18:31

    Your IUnitOfWork implementation contains all repositories.

    Your IUnitOfWork is injected into your presentation layer like mvc controller.

    Your IUnitOfWork is injected into mvc controller.

    Your IRepository is injected into your UnitOfWork implementation.

提交回复
热议问题