The repository pattern provides a way to provide isolation between the data access layer of your application with the business layer

learn more… | top users | synonyms

1
vote
0answers
7 views

EF Include method doesn.t result

I create Asp.Net Mvc4 application with Code First EF. I create my model, and now I want get relational info from Database. I write get method for this info as follow: public ...
0
votes
0answers
10 views

Domain driven design: overriding virtual methods in Domain classes

My application is broken down into several assemblies. The MyProject.Infrastructure assembly contains all of the Domain objects such as Person and Sale as well as interfaces repositories such as ...
0
votes
1answer
18 views

Changing entity framework default connection strings used by DbContext at runtime

I have a program using entity framework, and depending on which computer it is run on, it will either connect to a remote database over the network or a local database on the local filesystem. With ...
1
vote
1answer
34 views

Onion Architecture - Can model service refer another model Service?

I am developing a ASP.NET MVC application following the Onion Architecture. I would like to know the ModelServices in the Core can refer another ModelService? The ModelServices are concrete ...
0
votes
1answer
31 views

Entity Framework, Repository Pattern, Update in Detached Scenario

I'm trying to update an object graph that contains ICollection of modified/added/deleted entities in a detached scenario (short lived context), using EF 5.0? I have something like this: Visit ...
0
votes
1answer
39 views

Entity framework not getting data (Maybe Unit of Work doesn't work)

I have One to Many connection between message thread and messages. And I noticed smth. strange when I try to display messages for message thread. For example there are 5 messages in thread (I've ...
0
votes
1answer
36 views

Unity and Repository pattern

Hi I am using a UOW and Repository pattern in my project and I have created the following code: // Interfaces public interface IUnitOfWork : IDisposable { IGenericRepository<Company> ...
0
votes
2answers
63 views

What are alternatives to using IQueryable<T> in Repository Pattern?

I am ASP.NET MVC newbie (but .NET experienced dev) and I am trying to learn how to properly set web application infrastructure. Repository pattern is what I am copping these days and after reading ...
0
votes
0answers
30 views

Proxy on data agnostic models

I am at the very beginning of a project (MVC and maybe SPA). I use Dapper and i have implemented my own Repositories and Unit of Work. *Some of us don't really like a full featured ORM (EF, ...
1
vote
2answers
48 views

Entity Framework Unity of Work and Repository pattern

I'm trying to implement UoW and Repository pattern, but I get error An entity object cannot be referenced by multiple instances of IEntityChangeTracker. I know that I get that error because I have ...
0
votes
0answers
26 views

Calling a Service layer from a base class with no access to a repository

Not sure if this should be posted here or on the Programmers sister site MVC4 solution using AutoFac for ORM. I have a series of controllers which inherit from a basecontroller class. We have a DB ...
1
vote
3answers
64 views

Repository pattern and service layer implementation

I'm using the generic repository and unit of work pattern for my mvc4 website. Now I have the situation, that I want to delete a user of my system. In the delete code I must delete some more entries ...
2
votes
3answers
85 views

Generic Repository Pattern have repetition of code so what will be benefit?

I am understanding repository pattern in c#. I am confused when i study about generic repository pattern. There is lot of repetition in it. i have some question about this pattern. I am using Entity ...
0
votes
1answer
58 views

StructureMap select multiple constructor on GenericRepository

I'm using GenericRepository pattern from https://github.com/huyrua/efprs. I just want to select constructor with DbContext as parameter. I know there's duplicate question, but solution from this ...
0
votes
1answer
34 views

Proper way to dependency inject authenticated user to my repository class

I am using a service layer with repository pattern. The controller has a dependency on the service layer, and the service layer has a dependency on the repository. I have to pass logged in user ...

1 2 3 4 5 88
15 30 50 per page