tagged [repository]

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 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...

How to convert a normal Git repository to a bare one?

How to convert a normal Git repository to a bare one? How can I convert a 'normal' Git repository to a bare one? The main difference seems to be: - in the normal Git repository, you have a `.git` fold...

Moving Git repository content to another repository preserving history

Moving Git repository content to another repository preserving history I am trying to move only the contents of one repository (`repo1`) to another existing repository (`repo2`) using the following co...

27 Jan at 05:36

Error while validating the service descriptor 'ServiceType: INewsRepository Lifetime: Singleton ImplementationType: NewsRepository':

Error while validating the service descriptor 'ServiceType: INewsRepository Lifetime: Singleton ImplementationType: NewsRepository': I try get data from my database with repository Pattern i have 3 pr...

Pattern for retrieving complex object graphs with Repository Pattern with Entity Framework

Pattern for retrieving complex object graphs with Repository Pattern with Entity Framework We have an ASP.NET MVC site that uses Entity Framework abstractions with Repository and UnitOfWork patterns. ...

Where to convert business model to view model?

Where to convert business model to view model? In my ASP.NET MVC application, I am using unit of work and repository patterns for data access. Using the unit of work class and the repository defined i...

Why is a generic repository considered an anti-pattern?

Why is a generic repository considered an anti-pattern? it seems to me that a lot of specialised repository classes share similar characteristics, and it would make sense to have these classes impleme...

How can I log all entities change, during .SaveChanges() using EF code first?

How can I log all entities change, during .SaveChanges() using EF code first? I'm using . I'm using a base Repository for all my repositories and an `IUnitofWork` that inject to the repositories, too:...

Can I arrange repositories into folders on Github?

Can I arrange repositories into folders on Github? I am new to git and what I am doing now is to upload all my recent projects as repositories to github. There are a lot of different projects like web...

24 Jan at 18:4

git repo says it's up-to-date after pull but files are not updated

git repo says it's up-to-date after pull but files are not updated I have 3 repos. A bare repo which I use as a master repo, a dev repo in which I make and test changes, and prod repo from which scrip...

18 Jan at 03:15

How do I force Maven to use my local repository rather than going out to remote repos to retrieve artifacts?

How do I force Maven to use my local repository rather than going out to remote repos to retrieve artifacts? I’m using Maven 3.3.3 with Java 8 on Mac Yosemite. I have a multi-module project. When I bu...

14 Jan at 12:28

Why does Redis C# client method .getById() return null?

Why does Redis C# client method .getById() return null? I'm building a simple blog application in Asp.Net MVC and I want to use a Redis database. I have created a repository for my Users class that co...

How do you get the Git repository's name in some Git repository?

How do you get the Git repository's name in some Git repository? When you are working in some Git directory, how can you get the Git repository name in some Git repository? Are there any Git commands?...

17 Jul at 12:28

Dependency Injection with Massive ORM: dynamic trouble

Dependency Injection with Massive ORM: dynamic trouble I've started working on an MVC 3 project that needs data from an enormous existing database. (thanks to [Steven](https://stackoverflow.com/users/...

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...

Why aren't data repositories static?

Why aren't data repositories static? I was looking at the `repository` method for an `ASP.NET` MVC app and noticed a `static` class wasn't used. Since the repo is `CRUD`, why not make it `static`?

6 Apr at 08:5

How to manually deploy artifacts in Nexus Repository Manager OSS 3

How to manually deploy artifacts in Nexus Repository Manager OSS 3 After installing Nexus Repository Manager OSS 3 I do not see option `Artifact Upload` to upload artifacts through web page. In Nexus ...

24 Mar at 17:36

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...

How To Define a JPA Repository Query with a Join

How To Define a JPA Repository Query with a Join I would like to make a Join query using Jpa repository with annotation @Query. I have two tables: and: The native query is:

8 Feb at 13:51

How to write Repository method for .ThenInclude in EF Core 2

How to write Repository method for .ThenInclude in EF Core 2 I'm trying to write a repository method for Entity Framework Core 2.0 that can handle returning child collections of properties using .Then...

Untrack files from git temporarily

Untrack files from git temporarily I have setup a local git on my machine. When I initialized git, I added pre-compiled libs and binaries. However, now during my development I don't want to check in t...

30 Jun at 05:47

MVC design pattern, service layer purpose?

MVC design pattern, service layer purpose? Let's say I have a following repo pattern : ``` interface IGenericRepo where T : class { IEnumerable GetAll(); T GetById(object id); void Insert(T obj)...

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...

Moving a folder from one SVN repository to another

Moving a folder from one SVN repository to another I have a set of repositories with a structure similar to the following: ``` /Source /branches /tags /trunk /FolderP /FolderQ /FolderR /Targe...

23 May at 12:1