Questions tagged [repository]

For questions about the implementation of the repository design pattern.

Filter by
Sorted by
Tagged with
1
vote
1answer
684 views

ASP.NET Identity 2.0 UserManager alongside with UnitOfWork and Service-Locator anti-pattern

I was wondering whether it is a good aproach to have Identity 2.0 UserManager next to UnitOfWork pattern? I am using ...
1
vote
2answers
150 views

Check repository for a nested entity

I have a Product entity and a ProductCategory entity. Given the Product entity, my ...
1
vote
1answer
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 ...
1
vote
1answer
42 views

Laravel function to add a supplier, and associated addresses and contacts

I have a function addSupplier() that adds a supplier. Each supplier has multiple addresses and each address has multiple contacts. ...
1
vote
1answer
314 views

First attempt at Data Driven Design with MVC, to manage a user list

After what I've felt is a sufficient amount of research, I have made my first attempt at a domain driven design MVC project. I would love for you guys to tear it apart and give me pointers to make it ...
1
vote
1answer
565 views

Instantiate repository classes dynamically

I'm curious about the best way to instantiate my repositories. Currently they're in the main controllers constructor method. I was thinking making separate controllers for inbounds, outbounds, ...
1
vote
1answer
32 views

Simple todo list VanillaJS - repository pattern

I'm new in JavaScript, so I was looking for some reviews and advice for better code quality. ...
1
vote
0answers
86 views

C# Generic Repository and Unit of Work Implementation for Northwind [closed]

I have created 3 projects to implement layered architecture design mainly the - Presentation Layer (Web) - Domain Model Layer - Infrastructure Layer For simplicity, I have only two domain model ...
1
vote
0answers
136 views

Repository + Unit Of Work Pattern in WebAPI

I am refactoring my existing product's webapi part of the solution. Current Repo pattern does not allow me to add custom functions to a specific repository. In result, most of the functions directly ...
1
vote
0answers
1k views

Transaction integrity in asp.net core with entity framework and generic repository

I am not very experienced in Entity Framework, I previously used ADO.Net and Dapper for data persistence. For now, I only read Microsoft docs and watched a few video tutorials. I tried to stick to ...
1
vote
0answers
200 views

E-commerce site for posting advertisements

I am developing an e-commerce website in ASP.NET MVC. Users can post advertisements of different types on the site. I am using inheritance to define my Ad types, and this review is mainly about ...
1
vote
0answers
2k views

Using IoC Container with Entity Framework Repository Pattern

I am using WPF with Entity Framework 6 (DB first), Caliburn.Micro, and MEF. I am trying to ...
1
vote
0answers
250 views

Rate my implementation of Unif Of Work with Repository pattern and EF Core

I wanted to try something new in regards of design patterns. I have ended up with Unit Of Work with Repository and EF Core. So I just want to display my "real world" solution and maybe hear what you ...
1
vote
0answers
128 views

Repository pattern implementation

I'm in the process of delving into different design patterns and trying to implement them into my daily work routine. I come from an unstructured world of PHP and not understanding how to utilize it ...
1
vote
0answers
2k views

Repository pattern best practices

Which option is better? In the first case, I use a universal repository that can work with any entities. The methods of this repository have many parameters, such as string queries, table names, ...
1
vote
0answers
859 views

Repository pattern with data access objects

I started a new ASP.NET project in an effort to better learn SQL and Dapper ORM framework. My idea for data access: Have POCO entities, for each entity have DAO object. When I want to manipulate with ...
1
vote
0answers
107 views

Script that receives and formats data

The code snippet below, receives data from a form, formats and inserts into the database. This code snippet is located in a controller and the insertion is done in a '...
0
votes
1answer
714 views

Entity Framework MVC updating db using a repository method [closed]

I have inherited this code from a legacy project, and it is throwing a New transaction is not allowed because there are other threads running in the session. error. Now I know the problem here is ...
0
votes
1answer
500 views

Separate business logic from Data Access Logic in the repository

I have a PupilService which is calling the PupilRepository.AttachPupil() method. I have an N to M relation between ...
0
votes
1answer
45 views

Repository layer for MongoDB

I've implemented a quick and dirty repository to save and insert users to a MongoDB. As you can see, it just inserts one and finds one. Not a rocket. The thing is I don't really know what are the ...
0
votes
1answer
568 views

My take on implementing the Repository Design Pattern in PHP

The past few weeks I've been trying to grasp on nearly any Design Pattern ever invented, but the repository pattern is one I could understand and implement it myself in my project. My application uses ...
0
votes
1answer
258 views

Uploading photos: Domain Model and Repository classes

In the database, I have a table with name photographs with the following columns: id ...
0
votes
1answer
152 views

Awkward Generic Repository Call [closed]

I am implementing a generic repository pattern. I have done this quite a few times now but every time I do it there is something bugging me. If I have a database design like below. (All the tables ...
0
votes
0answers
29 views

Business logic refactoring needed

I am using asp.net web API and EF code first. I am querying the database based on values inside of the request object (initiate). If there are results, I am updating the database. Then I am querying ...
-2
votes
2answers
40 views

Initialize global repository or in forms? [closed]

Until now we have always initialized the repositories, that containing MySql functions, at the beginning of each Form Something like that Form example code: <...
-2
votes
1answer
133 views

Repository Pattern and SOLID principles [closed]

I have written the following Repository in C#, using NetCore 2.2 and EF Core. I was thinking how to write properly the Search method according to the SOLID principles. This code gives a null ...