Repository dependent on Unit of work?

Jan 11, 2016 at 10:56 AM
Edited Jan 11, 2016 at 11:28 AM
In the source code, I see that the the class Repository.Pattern.Ef6.Repository<TEntity> is dependent on IUnitOfWorkAsync. Further to this, I see that UnitOfWork is has dependency on repositories. _private Dictionary<string, dynamic> repositories; . Can someone please elaborate this interdependence? I have not see this two way dependency elsewhere Further to this, I could not also understand why there are two interfaces, IUnitOfWorkAsync and IUnitOfWork. Why not just one? What are we gaining by this.
Jan 26, 2016 at 1:33 PM
I feel the same way about the implementation of Repository class. The good thing about this is that if you are not comfortable with any part of the implementation you can change it. I modified the project to my needs and preferences, you can do the same. Again, i think the same as you do.
Feb 24, 2016 at 5:23 AM
I have used this framework a couple times, in one case I used the UnitOfWork implementation, in another I actually took it out based on something I read that stated that EF already uses UnitOfWork internally. Both implementations work fine. Although, in both cases I hard a hard time understanding how this was supposed to work with IoC/Di as the unit of work field on the repository is private and cant be called to save changes from a "service" where the IRepositoryAsync is injected.