Questions tagged [repository-pattern]

The tag has no usage guidance.

12 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
8k 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 ...
2
votes
1answer
66 views

Database Model Classes in TypeScript

I'm using Knex.js with TypeScript for database access. Table uid (UUID, auto-generated by Postgres) name (varchar) Model interface User { uid: string | null; name: string; }...
1
vote
0answers
66 views

Changing entities in Clean Architecture

I'm modeling the "Domain" Layer of "Clean Architecture" for an application that gets its data from an XML file when starts. The XML file looks like: <?xml version="1.0" encoding="UTF-8" ?> <...
1
vote
0answers
85 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
50 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
0answers
37 views

Repository Pattern without OR Mapper - Accessing of Attributes

I have a aggregate root called "Billing Document" which has some additional entities as attributes ("Billing lines"). I want to persist these objects together into my database. I read about the ...
0
votes
0answers
161 views

Domain driven design and asynchronous code (repository)

I am trying to write domain code and I am pretty happy with my architecture so far. Problem started at point when I needed to create different implementation of repository, that required asynchronous ...
0
votes
0answers
63 views

Implementing Core Data parent-child context relationship via Entity Framework

I'm working on porting an iOS app to Xamarin, where it's hoped that the Xamarin project will match as much of the logic and layout of the iOS project as possible. One big area that the iOS project ...
-1
votes
3answers
109 views

When adding a ListFooForBar method, should it go into the FooRepository or BarRepository?

I have a requirement to list country codes (e.g. CA, US) by username. A single user may have zero, one or more countries and a single username. A country has a single country code. I have a ...
-1
votes
1answer
33 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 ...