tagged [repository]

Async/Await in multi-layer C# applications

Async/Await in multi-layer C# applications I have a multi-layered C# MVC4 web application in a high-traffic scenario that uses dependency injection for various repositories. This is very useful becaus...

ASP.NET Identity with Repository and Unit of Work

ASP.NET Identity with Repository and Unit of Work I'm learning Repository and Unit of Work patterns in ASP.NET MVC 5 application with Entity Framework 6. I had already read a lot of tutorials and arti...

Repository pattern implementation with data model in a tree structure

Repository pattern implementation with data model in a tree structure I have two data collections in two different models that implement a repository interface. One of them is in a flat list which fit...

19 Dec at 18:59

How to use the repository pattern correctly?

How to use the repository pattern correctly? I am wondering how should I be grouping my repositories? Like from the examples I seen on the asp.net mvc and in my books they basically use one repository...

Service Layers and Repositories

Service Layers and Repositories I've been using MVC frameworks for a short while now and I really like how the concerns are separated out. I've got into a bad habit of letting the controllers do quite...

Should write complex query in Repository or Service layer?

Should write complex query in Repository or Service layer? I are planning migrate our data access layer to using repository pattern and unit of work. I do know repository will help me to change persis...

Best way to implement Repository Pattern?

Best way to implement Repository Pattern? I've been exploring BDD/DDD and as a consequence trying to come up with a proper implementation of the Repository pattern. So far, it's been hard to find a co...

How to fake DbContext.Entry method in Entity Framework with repository pattern

How to fake DbContext.Entry method in Entity Framework with repository pattern Because I want to unit test my code I have implemented the repository pattern in my MVC4 application. I managed to make a...

How do I correctly use Unity to pass a ConnectionString to my repository classes?

How do I correctly use Unity to pass a ConnectionString to my repository classes? I've literally just started using the Unity Application Blocks Dependency Injection library from Microsoft, and I've c...

Invalid Argument in Method when pulling from repository

Invalid Argument in Method when pulling from repository I am trying to learn how this Repository works by disecting it. I am really lost so was hoping the community would help me out a bit. Please kee...

How does a service layer fit into my repository implementation?

How does a service layer fit into my repository implementation? I have created a POCO model class and a repository class which handles persistence. Since the POCO cannot access the repository, there a...

Unit test an Entity Framework generic repository using Moq

Unit test an Entity Framework generic repository using Moq I am not able to get a passing test because the class `this.dbSet = context.Set();` is always `null`. As you can see in the code below, I hav...

How to implement Generic Repository Design Pattern with Dapper?

How to implement Generic Repository Design Pattern with Dapper? I am using Dapper for a MicroORM to retrieve and Save Data to SQL Server 2014. I have got DTO classes in a DTO Proj that represent the D...

Entity Framework Generic Repository Error

Entity Framework Generic Repository Error I am trying to create a very generic generics repository for my Entity Framework repository that has the basic CRUD statements and uses an Interface. I have h...

Transition from Entityspaces(Tiraggo) into Servicestack Ormlite

Transition from Entityspaces(Tiraggo) into Servicestack Ormlite at this moment we are migrating from Entityspaces(Tiraggo) into Servicestack Ormlite. One point is the way to open and close the DBConne...

Using View-Models with Repository pattern

Using View-Models with Repository pattern I'm using [Domain driven N-layered application architecture](http://blogs.msdn.com/b/marblogging/archive/2011/05/23/domain-drive-design-n-layered-net-4-0-arch...

How to unit test a repository pattern that uses Entity Framework?

How to unit test a repository pattern that uses Entity Framework? I'm currently trying to unit test a repository I made through Entity Framework: What I want to happen is that test the repository with...

DDD - How to implement high-performing repositories for searching

DDD - How to implement high-performing repositories for searching I have a question regarding DDD and the repository pattern. Say I have a Customer repository for the Customer aggregate root. The Get ...

Trying to simplify our repository pattern

Trying to simplify our repository pattern Currently we have implemented a repository pattern at work. All our repositories sit behind their own interfaces and are mapped via Ninject. Our project is qu...

Onion Architecture, Unit of Work and a generic Repository pattern

Onion Architecture, Unit of Work and a generic Repository pattern This is the first time I am implementing a more domain-driven design approach. I have decided to try the [Onion Architecture](http://j...

Using Simple Injector with Unit Of Work & Repository Pattern in Windows Form

Using Simple Injector with Unit Of Work & Repository Pattern in Windows Form I'm trying to implement IoC in my windows form application. My choice fell on Simple Injector, because it's fast and lightw...

Persistance ID's and Domain Model Entities

Persistance ID's and Domain Model Entities I was curious on what peoples thoughts are on keeping the Id of a DAL entity as a property of the Domain Entity, at the absolute most a read-only property. M...

Well designed query commands and/or specifications

Well designed query commands and/or specifications I've been searching for quite some time for a good solution to the problems presented by the typical Repository pattern (growing list of methods for ...

How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?

How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning? I tried to install a package, using but received the warning Why doesn't R think that the package is available? S...

Repository and Data Mapper pattern

Repository and Data Mapper pattern After a lots of read about Repository and Data Mapper I decided to implement those patterns in a test project. Since I'm new to these I'd like to get your views abou...