Questions tagged [repository]
For questions about the implementation of the repository design pattern.
15
questions
38
votes
2
answers
3k
views
KISS my... unit of work
I've seen many, many UoW+Repository implementations. Whenever one was built on top of Entity Framework, I'd cringe at the added complexity.
Sure the complexity buys you (sometimes) full decoupling ...
14
votes
2
answers
2k
views
YARPI: Yet Another Repository Pattern Implementation
Following-up on this post, I wanted to be able to put a copy of that Excel workbook on a USB key and take it home to keep working on the code a bit (there's more than just one or two tables to ...
12
votes
2
answers
321
views
Something like a LINQ provider
Ok, before you ask: yes, I need to do this. Sort of.
I'm wrapping a 3rd-party API for data access, and I can't use an ORM, so I'm implementing this kind of thing:
...
7
votes
1
answer
1k
views
UnitOfWork, an excuse for multiple repositories
I needed a way of attaching multiple repositories to a presenter. Given I already had an IRepository abstraction, coming up with an ...
7
votes
2
answers
22k
views
C# - Entity Framework + Repository pattern + Unit of work pattern
After hours spent on reading various articles about correct way to implement Repository patter & UoW patters I finally think that I have managed to create (hopefully good) implementation.
The ...
6
votes
2
answers
2k
views
Web API using Repository / UnitOfWork
I'm looking for feedback on a repository I set up based on a blog post I read here.
I have just recently got more into .NET within the past year, so any feedback and/or best practices that can be ...
6
votes
1
answer
77
views
Wrapping the Sage300 View API with... a Repository
Related: Something like a LINQ provider
I needed to work with the Sage300 View API. I had never worked with it, but my first impression has been that the API is ...
4
votes
4
answers
2k
views
Banking System console app in C++
I built a banking system in C++ (still a lot of features to do but (I decided to post it here to see what can I change so I wont make those mistakes in the future).
User header and c++ files
Header
<...
3
votes
0
answers
2k
views
Custom generic repository pattern
This weekend I made an attempt at a generic repository pattern for entity framework in .NET after reading this blog post. I was wondering how it could be better. I specifically have a couple questions....
2
votes
1
answer
2k
views
Replacing IUnitOfWork with a Factory Pattern
As a follow-up to this blog post and this question, I wanted to post my idea of replacing the IUnitOfWork with a factory pattern. It seems to me that in the case of this blog post the IUnitOfWork ...
2
votes
2
answers
134
views
Repository searching code duplication
A followup question to this: IQueryable Extensions working on expression for collection property
I am working on a project for a family member which involves the use of a database and a repository, ...
2
votes
1
answer
17k
views
Table join using the repository pattern
I am new to repository pattern. If I want to join two tables, where should I implement the logic? I have implemented it as shown below. Is there any better way to achieve the same?
This is my ...
2
votes
1
answer
211
views
Simple repository for a small/medium sized ASP.NET MVC site
I am about to start a small/medium sized project. I am by no means a software architect. But I tend to question every move I make at times, since I want to do things correct.
I found a way to ...
1
vote
1
answer
1k
views
ASP.NET MVC application architecture fit for unit testing with mocking
I am trying to learn how to professionally work with unit testing, so I have refactored a medium sized project of mine (a sort of article aggregator that also does some NLP processing) and tried to ...
0
votes
1
answer
704
views
Uploading photos: Domain Model and Repository classes
In the database, I have a table with name photographs with the following columns:
id
...