Questions tagged [repository]

Can refer to the data store of a version control system containing the whole history of a project, or to an object that transfers data between the business layer of an application and its data store.

A repository is an object that transfers data between the business layer of an application and its data store. It appears to the developer-user as a factory that generates objects or collections in response to queries. Updated objects and collections can be passed back to the repository for persistence to the data store.

A Repository provides a clean separation between business and persistence logic. Repositories are often used with Object/Relational Management (ORM) frameworks. A repository can simply wrap the methods of an ORM, or it can provide a framework-neutral interface that isolates the business layer of the application from the ORM, allowing the ORM to be replaced at a later date without modification to the business layer.

The Repository Pattern is described by Martin Fowler in Patterns of Enterprise Application Software.

It can also be viewed as a:

  • Software Repository: a storage location from which software packages may be retrieved and installed on a computer.
  • Version Control Repository: an on-disk data structure which stores metadata for a set of files and/or directory structure.

See also:

8107 questions
3
votes
2 answers

how to fetch only commits history, not files using git

is there any way to fetch only history? Sometimes repositories are big and it takes very long period of time to download it. I don't need a files, i just need to look for commits history with git log and git show.
3
votes
0 answers

using a private github repository to host a private maven artifact

Question title kind of explains it all. I've seen other questions referencing this but I think they are more geared towards the github repository being public. Using this configuration in the dependent project works when the repository is…
Justin
  • 2,442
  • 1
  • 14
  • 22
3
votes
1 answer

SourceTree github repo not valid url

When I install SourceTree on my OSX, setup a Github account via ssh, and then copy/paste Github url/clone, It always says "Not a valid sourcepath/URL" even though the url is valid. I have searched the web for the same issues, and found some…
simon
  • 1,897
  • 6
  • 28
  • 43
3
votes
2 answers

ASP.NET MVC2 LINQ - Repository pattern, where should the pagination code go?

I'm working on adding an HtmlHelper for pagination, but I am unsure where the proper and/or most beneficial place to put certain parts of the pagination code from a performance and maintainability standpoint. I am unsure if the Skip(), Take() and…
Sgraffite
  • 1,758
  • 3
  • 20
  • 28
3
votes
1 answer

Git suddenly cant find Github repository

I have got a Github organisation managed by my github account. All my repositories have been working well. When I create a new repository I set it as private and add my Github account as Collaborator. Suddenly all my repositories on all computers…
D0vev
  • 129
  • 2
  • 13
3
votes
1 answer

Best practice in Gradle to configure Maven repositories globally

In Maven there is the settings.xml file in which I configure repositories (like Maven repository on a Sonatype Nexus server). In my Gradle project the URL of the Maven repository is configured directly in my build.gradle file. What is best practice…
Bernhard
  • 5,161
  • 6
  • 35
  • 78
3
votes
1 answer

Is SVN's relocate a safe option to synchronize code with two subversion repositories?

Variants of this question have been asked many times, but none of the answers clarified what I am interested in: I would like (obviously... :) to synchronize my local working copy with two repositories on two different servers. If I use svn switch…
fuenfundachtzig
  • 6,344
  • 11
  • 54
  • 77
3
votes
2 answers

How to connect Controller to Service layer to Repository layer

Lets say I have the following entities that map to database tables (every matching property name can be considered a PK/FK relationship): public class Person { public int PersonID { get; set; } public string FirstName { get; set; } public…
3
votes
1 answer

Repository Pattern: Dealing with Identical Repositories

I have four very similar but hierarchical entities. Each one has a foreign key to the previous and contains collections of the next ones. Part of entity Right now, these entities have four identical repositories: Repository The implementations of…
end1dream
  • 109
  • 2
  • 6
3
votes
0 answers

Downloading google repository - url not found

Fetching https://dl.google.com/android/repository/addons_list-2.xml Validate XML Parse XML Fetched Add-ons List successfully Fetching URL: https://dl.google.com/android/repository/repository-11.xml Validate XML:…
krikor Herlopian
  • 661
  • 1
  • 10
  • 22
3
votes
1 answer

Project repository is ignored if mirrors are configured in the settings.xml

I've created a project repository using this guide: https://devcenter.heroku.com/articles/local-maven-dependencies This works fine if I comment out the mirrors definition in the settings.xml file in the .m2 folder. If the mirrors are defined, the…
KayJ
  • 253
  • 4
  • 13
3
votes
1 answer

Checking a maven project's repository portability

Is there any way to check all dependencies are downloadable from at least one listed repository? I was once omitted a required repository from my pom.xml. But maven didn't complain because those dependencies already had been installed in my local…
Jin Kwon
  • 1,755
  • 2
  • 13
  • 15
3
votes
1 answer

Why would I add CommandType in Query method?

Consider the following codes: public List Read() { using (IDbConnection db = new SqlConnection (ConfigurationManager.ConnectionStrings["AdventureWorks"].ConnectionString)) { string readSp =…
Red Wei
  • 799
  • 4
  • 19
3
votes
1 answer

Github: Share private repository with another organization

I belong to two github organizations, let's say O1 and O2. There is one private repository in O1 that can only be accessed by the people who belong to O1. Is there a way I can share that repository with the people in O2? I tried git clone --mirror…
Mariana
  • 111
  • 1
  • 8
3
votes
2 answers

How to modify a git repository's history to show contents were imported from another repository?

I have two projects, A and B. They were poorly divided, because A had to run one part before B and another part after B. So I decided to merge them. B's contents were copied into A's working directory, committed, and work continued from there. Of…
Craig Gidney
  • 16,378
  • 4
  • 62
  • 124
1 2 3
99
100