Timeline for Web API using Repository / UnitOfWork
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 21, 2015 at 1:55 | comment | added | MplsAmigo | Get the repository you need from the factory, then convert it to the right type which should give you access to the extra methods. | |
| Apr 21, 2015 at 1:31 | comment | added | Scott Smith | What happens when you have the need for some custom methods on one or more repositories? You can extend EFGenericRepository, but then you can't get at it from your RepositoryFactory (which lets face it, is the nearly the same as this UnitOfWork class renamed with a method for getting repositories using generics). I think when we talked about this initially we already discussed this road block. | |
| Apr 20, 2015 at 15:39 | history | edited | MplsAmigo | CC BY-SA 3.0 |
added 588 characters in body
|
| Apr 20, 2015 at 14:19 | comment | added | MplsAmigo | See here for an example of what I'm talking about: codereview.stackexchange.com/questions/87437/… | |
| Apr 20, 2015 at 13:59 | comment | added | MplsAmigo | I'm still working out the code to get it to work, but from my understanding the IUnitOfWork in this instance seems to be a type of sudo factory. A single point of access to all the Repositories with each repository type hardcoded with accessors to each. My goal is to make this as dynamic as possible. | |
| Apr 20, 2015 at 13:28 | comment | added | Scott Smith | I would definitely introduce a service layer as the app progresses and business logic comes to exist. Right now, I basically stubbed in the baseline data access. That said, I still planned to use UnitOfWork directly for simple operations that can be achieved directly through EF. I am interested to see what you meant by the factory that eliminates the UnitOfWork. | |
| Apr 20, 2015 at 12:25 | comment | added | Legato | Welcome to CodeReview, solomon8718. Would you expand on why you'd refactor IUnitOfWork? | |
| Apr 20, 2015 at 12:18 | review | First posts | |||
| Apr 20, 2015 at 12:25 | |||||
| Apr 20, 2015 at 12:15 | history | answered | MplsAmigo | CC BY-SA 3.0 |