repository

Should a Repository implement UnitOfWork?

核能气质少年 提交于 2019-12-07 17:07:44
问题 In a DDD pattern should the unit of work be coupled with the repository? I've seen several different examples, including a repository that implements a unit of work interface, a repository that implements the behavior for unit of work itself, and a repository that has a property representing the unit of work so that it can be shared across multiple repository instances in the lifetime of the UoW. In the case of the latter, it kind of seems like an anti-pattern...that is, should a consumer

Git: Creating Git Submodules out of existing repository and reflecting parent changes to the child repository

人盡茶涼 提交于 2019-12-07 16:31:08
问题 Please note that I am new to Git. I have two repos: Libgdx REPO gdx-sqlite REPO The main repository is Libgdx REPO and all of my work goes into this repository, mainly in the gdx-sqlite project. Since I wanted gdx-sqlite project to appear as a separate repository, what I did was: Created a new repo on GitHub (gdx-sqlite REPO) Created a local repo (nested inside the local libgdx repo) on my machine Pushed all the code of the local nested repo to remote gdx-sqlite REPO This resulted in

Accessing files of a repository from the Git server

梦想的初衷 提交于 2019-12-07 15:54:04
问题 I have to access some files stored in a Git repository, but I don't see where they are stored inside the repository folder. Is there a special way to access the various files pushed from the clients? 回答1: If this is a bare repo, you wouldn't find those file in the repo.git folder. See "all about "bare" repos": a bare repo has no working tree, and is used for pushing to it (since there is no working tree to keep in sync with an updated branch) The easiest way to see those file is to clone said

GitHub: Restrict Access to specific branch [duplicate]

假装没事ソ 提交于 2019-12-07 13:28:56
问题 This question already has answers here : A way to restrict Git branch access? (9 answers) Closed 6 years ago . Is there a way to restrict access to certain branches within a repository? We have production and master branches which sometimes get messed up with rogue pushes. 回答1: Not with GitHub in the same repo . (as opposed to local repos, which can be protected by an authorization layer like gitolite) You could have: one repo for production and master branch, with only the prod team as

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

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 12:42:06
问题 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 Count() portions of Linq to SQL data manipulation should live within the repository or the controller. I am also unsure if their order and where they are used affects performance in any way. If they live within the repository from my understanding

What does a repository look like when using many 1:Many or Many:Many tables?

血红的双手。 提交于 2019-12-07 11:48:07
问题 I have a MVC application that uses that entity framework model object directly in the view. I'm not sure how bad of a design pattern this is, but based on this sample I need to use a repository to implement caching. namespace MVCAzureStore.Services.Caching { public class CachedProductsRepository : CachedDataSource, IProductRepository { private readonly IProductRepository repository; public CachedProductsRepository(IProductRepository repository, ObjectCache cacheProvider) : base(cacheProvider,

separate local download and install repositories using maven?

99封情书 提交于 2019-12-07 11:13:01
问题 I want to rebuild my project structure from scratch from time to time and want to purge the built repository in order to do that. However, I don't want to remove downloaded files from maven central and other repositories. Is there a simple way to tell maven to install my built artifacts into a separate repository, ie. other then the one used to store downloaded, external files? I am NOT talking about deploy , just mvn install . UPDATE I found an alternate solution using only one local

File Level Tracking In Git (Files from multiple branches in same directory)

情到浓时终转凉″ 提交于 2019-12-07 10:43:40
问题 Is there any script that lets one remember branch/commit seperatly for files in some directory so that one can simultaneously work on file1 on branch1 and file2 on branch2 in the same directory and have them commit appropriately. If not I'll implement it myself. My plan is to have hidden checkout directories for various branches/repos and populating the apparent checkout with links to these files so that commits simply committed their respective hidden branches but advice would be appreciated

Git subrepositories

风格不统一 提交于 2019-12-07 08:10:42
问题 I am a member of a small firmware team and we use a private Git server for version control. Our codebase typically has folders for platform specific code, common code used by multiple platforms and an SDK provided by the manufacturer of the microprocessor we develop on. Currently our repositories are centered around common code; each platform has a folder in the repository. This has at least two serious consequences; When we push changes for one platform it's visible for all other platforms

Mercurial merge repository as branch

谁说胖子不能爱 提交于 2019-12-07 08:08:45
问题 I have two Mercurial repositories that are for different major revisions of the same project. The latter version is a massive change to the functionality, and especially the UI, of the project, but it will still have a lot of common code with the earlier version. (For shorthand I'll call these versions 4.6 and 5.0 and the repositories project-4.x and project-5.x going forward; that's basically what I'm dealing with.)[1] As we thought more carefully about the structure of our repository, and