repository

Domain driven design and aggregate references

别来无恙 提交于 2019-12-12 15:26:59
问题 I am designing the domain model, but there is something that doesn't seem to be ok. I start with a main aggregate. It has references to other aggregates and those other aggregates reference more aggregates too. I can travel the hole domain model starting from the main aggregate. The problem I see is that I will be holding all instances of aggregates in memory. Is that a good design? I can solve the memory problem with lazy loading but I think that I have a deeper problem. I have another

How can I inject the Repositories to the UnitOfWork?

橙三吉。 提交于 2019-12-12 14:22:44
问题 I've implemented my UnitOfWork so that it keeps references to all repositories. public interface IUnitOfWork { void Commit(); void RollBack(); } public interface IMyUnitOfWork : IUnitOfWork { IFooRepository Foos { get; } IBarRepository Bars { get; } // Other repositories ... } Note that the repositories implements a generic type of repository interface. public interface IFooRepository : IRepository<Entities.Foo> { // FooRepository specific methods goes here. } public interface IRepository<T>

After Repo sync, there are no files in the directory

安稳与你 提交于 2019-12-12 13:38:47
问题 I've setup a new Repo for Android source code, and after executing the repo sync, there are no files in the repo directory. Did I miss something? I used: repo init -u git://android.git.kernel.org/platform/manifest.git repo initialized in /home/tarandeep/code/Android repo sync ... It downloaded GBs of data (I can confirm via network monitor) and then nothing appeared in the Android directory. 回答1: It's a git repo in a hidden directory, .git . "Hidden" just means it starts with a period. When

Add all jars in a repository as dependencies in IntelliJ

老子叫甜甜 提交于 2019-12-12 12:01:53
问题 I have a savant repository in my project and I want to add all of the jars contained within the repo to IntelliJ's depenedcies list. I can add the jars one at a time, but I want to be able to add them all at once. Is there a way to add all the jars found within all the directories/subdirectories? Details: IntelliJ 12 Update: I can not change the repository structure, it is auto populated when ant builds. 回答1: Adding jars from a directory is supported, but not recursively, please vote for this

One repository/multiple projects without getting mixed up?

倖福魔咒の 提交于 2019-12-12 10:57:47
问题 After reading Joel's last article on Mercurial, I'm giving it a shot on XP as a single-user, single-computer source control system. One thing I'd like to check, though, is: It'd be easier to just create a repository of all the tiny projects I keep in eg. C:\VB.Net\, but the result is that the changes I make to the different projects therein (C:\VB.Net\ProjectA\, C:\VB.Net\ProjectB\, etc.) will be mixed in a single changelog. But if I use a single repository for all projects, when I do diff's

fatal: protocol error: bad line length character: Unab

半腔热情 提交于 2019-12-12 10:36:22
问题 I have a Windows 2008 R2 Server Standard Edition. I have FreeSSHd installed along with Git. Windows firewall has exceptions set to port 22. I have the SSH server setup to accept only SSH public keys. I can login to the server fine using terminal (i.e. ssh gregory@hostname ). When I go to use the git clone command (e.g. git clone ssh://gregory@hostname/path_to_my_repo ) I get this error: fatal: protocol error: bad line length character: Unab I am at an absolute loss as to what's causing it. I

repo gets stuck after downloading

荒凉一梦 提交于 2019-12-12 09:55:30
问题 I'm using repo to download Android source code (ICS). However, repo gets stuck after downloading about 6.2G data. The last lines of repo's output is: remote: Counting objects: 249, done remote: Finding sources: 100% (129/129) remote: Getting sizes: 100% (144/144) remote: Compressing objects: 100% (24/24) remote: Total 129 (delta 69), reused 127 (delta 68) Receiving objects: 100% (129/129), 15.60 MiB | 2.17 MiB/s, done. Resolving deltas: 100% (69/69), completed with 46 local objects. From

git push… fatal: Unable to create master.lock: File exists

℡╲_俬逩灬. 提交于 2019-12-12 09:54:34
问题 Help! When I try to do a git push origin master now, I get: fatal: Unable to create '/home/ubuntu/workspace/.git/refs/remotes/origin/master.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. Of course, I've found other similar questions (e.g. here), but the upvoted answers in there merely suggest deleting the offending file...

MVC architecture - patterns

风格不统一 提交于 2019-12-12 09:27:23
问题 I need some help with MVC architecture. I use the following architecture for an object named User. UserRepository -> IUserRepository -> UserService -> IUserService -> UserController The User object comes from my database and I'm using EntityFramework. I have a function that returns a list of users Return_All_Users(). One of the fields that gets returned is "UserType". This comes out as a number, but when I show the list in my Index.aspx page, I would like it to show as a string. The number

How can I keep a subfolder of a git repo in sync with a subfolder of another git repo

怎甘沉沦 提交于 2019-12-12 09:09:07
问题 I have two git projects. One depends on a subfolder of another repository. Here's how the folders are setup. repoA .git folderA1/ folderA2/ repoB .git folderB1/ folderB1/folderB11 folderB2/ What I want would like to achieve is the following repoA .git folderA1/ folderA2/ folderB11 <<<< This maps to the repoB on branch name "blah" repoB .git folderB1/ folderB1/folderB11 folderB2/ In repoA , some files in folderA1 might reference the ones in folderB11. repoA contains python modules that