Questions tagged [repository-pattern]

The tag has no usage guidance.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
5k views

Unit Of Work with multiple database context

I have created an application (net core 2 & ef core) with Unit Of Work and Generic repository pattern. I used to have one database context but due to some business logic I had to create a second ...
1
vote
0answers
75 views

Should a UnitOfWork contain every Repository?

I'm trying to get the Repository/UnitOfWork pattern figured out. We're working on a project with EntityFramework and our DBContext contains 200+ tables. Right now our approach is to inject whatever ...
1
vote
0answers
47 views

Correct method for handling edit/update scenario in repository pattern

I have a repository pattern employed in my .NET Core 2.1 project. While implementing the edit/update scenario, I have a doubt. My domain: public class Component { public int Id { get; set; } ...
1
vote
0answers
2k views

Proper implementation of Repository Pattern with MVVM in WPF

I am currently refactoring a WPF application that is built on the principles of the Repository Pattern. It uses Entity Framework as its ORM, and is Database First. Each of those entities is wrapped by ...
0
votes
1answer
205 views

Update Entity for Repository Pattern and UOW Pattern C#

In one mock solution, I have created 3 mock projects to implement layered architecture design mainly the - Presentation Layer (Web) - Domain Model Layer - Infrastructure Layer. I haven't yet to add ...
-1
votes
1answer
30 views

where to put business constraints

We have a 3-tier architecture: Web, Business, Models using the MVC pattern. Models are Code-First using EF6. Currently we access the dbContext directly in our Controllers to query and save changes. We ...
-1
votes
2answers
42 views

Logic to create/update values while maintaining their uniqueness (in a multi-threaded environment)

Assume I have a dumb repository which stores numbers (for sake of this example). It is dumb because it may only create new record, update specified record and list all the existing records - no other ...