Skip to main content

Questions tagged [repository-pattern]

The repository pattern provides a way to provide isolation between the data access layer of your application with the business layer. When using this tag on implementation heavy questions - tag the code language the implementation is written in.

repository-pattern
-2 votes
0 answers
39 views

Failure to Update SQLite Table [closed]

I'm trying to find the Exception ex message for why my Table Update is failing. But I can only see the result 0 and Record Failed to update. Here is my code : public int UpdatePatient(Patient patient) ...
Fritz's user avatar
  • 35
1 vote
1 answer
42 views

Laravel repository method helper file is not loaded

i am using folder structure like project/ project-repository/ src/ User/ UserInterface.php UserRepository.php composer.json ...
Laravel coder's user avatar
0 votes
1 answer
44 views

Angular dependency injected classes: how to hold different information in a single class

I am quite new to this so apologies if these are obvious questions, but I have not found a answer from Googling. My Angular application needs to access data from a large number of JSON files. These ...
James Morgan's user avatar
0 votes
0 answers
36 views

Improving Repository and Service Design Patterns in Express (TypeScript)

I'm implementing the repository pattern in my Express application and considering whether my service classes should be designed as singletons. Here is the current setup: This is my Base Repository ...
Nishan Raut's user avatar
0 votes
0 answers
42 views

FastAPI repository pattern and Celery connection

Has anyone ever worked with FastAPI Repository pattern and Celery ? I am having a hard time to call a service within the Celery application. Since you have to use dependency Injection for Fast API, ...
Lutaaya Huzaifah Idris's user avatar
0 votes
0 answers
36 views

Is it good to manage the metadata over multiple files in a multi node environment?

We have a requirement where in we have to register a database for a scheduled job , and when the job is done, we have to de-register this database for that scheduled job. There are two ways to look at ...
Bhargavi Amancharla's user avatar
0 votes
0 answers
25 views

What dependency injection pattern works with shared domain entities using the repository/unit of work pattern

I'm embarking upon a new application framework which will ultimately support many different applications and for each of those applications they will all share a set of common domain entities e.g. ...
Andrew HB's user avatar
  • 392
0 votes
1 answer
127 views

EF Core | Adding a related entity | The database operation was expected to affect 1 row(s), but actually affected 0 row(s)

Unable to figure out why I am getting the following error: { "title": "Server Error", "status": 500, "detail": "The database operation was expected ...
Mush-A's user avatar
  • 445
0 votes
1 answer
34 views

polymorphic *_type problem with repository pattern in laravel

I need some help with a polymorphic many-to-many relationship. I am using the controller-service-repository pattern. The problem occurs when I write a query in ProjectRepo that extends Project. In the ...
Farhad's user avatar
  • 1
1 vote
0 answers
78 views

Drizzle - Convert pg SelectedFields to plain type

I'm currently using Drizzle in a project and have implemented a repository pattern for the connection with Drizzle. The issue is that within the base class of the repositories, I have this method ...
CodeRevenge's user avatar
0 votes
0 answers
519 views

.Net Core 8 Clean Architecture, Using Unit of work and Generic Repository pattern causes a DI problem

A simple .Net core 8 Clean Architecture project. I'm using the Repository pattern with Unit of Work. I've a problem with DI. Would you please have a look on the images for a better understanding?! ...
Mahmoud's user avatar
  • 13
0 votes
0 answers
22 views

Have a Repository Method Analyze Multiple Tables

In building complex calls with the repository pattern for the first time, I'm researching best practices. The response in this post Having a repository dependent on another repository seems to suggest ...
E. A. Bagby's user avatar
0 votes
2 answers
36 views

Unit of work is being used but im not understanding where to put the commit in the repository class or in controller?

[HttpPost] public async Task<ActionResult> EmployeeEdit(EmployeeViewModel model) { var emp = await _unitOfWork.Employee.FindById(model.EmployeeId); if (emp == null) { return ...
Sagun Shakya's user avatar
0 votes
0 answers
26 views

Shipping an "example" directory (intended for deletion) in a Git repository

In a project that uses directories or files as part of presentation, you might want to ship some examples. But if those examples actually affect the final presentation, the expectation would be for ...
groovenectar's user avatar
  • 2,908
0 votes
0 answers
55 views

Spring Repository - Is it OK creating a @Repository class only for a specific stored procedure?

I have to call a stored procedure in my project and it requires: validation if a temp database exists create this temp db if needed execute insert statements in this temp db call stored procedure ...
fco's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
214