repository

How do I organize my Git repo

不羁岁月 提交于 2019-11-30 20:52:57
I'm facing the following problem and don't have an answer to it: We have a repo that was cloned from an SVN repo. The project stored in that repo is something like a platform software that gets used by various projects. The structure of the repo is like this: platform |- core |- additional The structure of that repo cannot be changed for some reasons. Both, core and additional contain data that are part of that platform . If a project wants to use the platform and add some functionality, it creates a new folder under additional containing the sources and adds a header for that functionality to

What is the correct way to use Unit of Work/Repositories within the business layer?

左心房为你撑大大i 提交于 2019-11-30 20:30:59
Having built a small application using the Unit of Work/Repository pattern, I am struggling to understand how to use this properly within my business layer. My application has a a data access layer which can be either NHibernate or the Entity Framework. I can switch between these easily. I have a number of repositories, for example, Customer, Order etc. My unit of work will be either an ISession or an Object Context depending on which DAL I want to test with. My business layer contains a single business method - CreateOrder(). What I am struggling to understand is where in the business layer I

XCode4 add Repository Host Unreachable?

点点圈 提交于 2019-11-30 19:53:42
I'm trying to add a remote linux SVN repository to my project but when I enter the server address I get the message Host is unreachable. I'm entering it like svn://ip_address/myproject/ From terminal I can do this svn list svn://ip_address/myproject/ and it shows the contents without any issues. I had this problem as well in linking to a Git repository. It seems XCode has some issues with IP addresses. I found that by modifying my hosts (/private/etc/hosts on Mac) file and adding an entry for the repository's IP address does the trick. Hosts file entry: i.p.add.ress serverName #where i.p.add

extbase repository findAll() returns result null

折月煮酒 提交于 2019-11-30 18:54:50
I have several Controllers like those: CategoryController and NewsController As well as the domain models for category and news and reposirtories for both. In the NewsController I do a dependencyInjection like this (the same way as in categoryController): /** * categoryRepository * * @var Tx_MyExtension_Domain_Repository_CategoryRepository */ protected $categoryRepository; /** * injectCategoryRepository * * @param Tx_MyExtension_Domain_Repository_CategoryRepository $CategoryRepository * @return void */ public function injectCategoryRepository(Tx_MyExtension_Domain_Repository_CategoryRepository

Fake DbContext of Entity Framework 4.1 to Test my repositories

只愿长相守 提交于 2019-11-30 18:53:27
问题 I'm have a Base Repository and all Entities repositories inherits from that. In my testes i create a Fake DbContext and Fake DbSet to test my repositories, but when implementing some methods in my FakeDbContext I'm not able to implement the IDbContext.Entry method: public class FakeDbContext : IDbContext { private IDbSet<Usuario> _usuario; private IDbSet<Atividade> _atividade; private IDbSet<Autor> _autor; private IDbSet<CategoriaModulo> _categoriaModulo; private IDbSet<CategoriaMateria>

SVN: Moving repository trunk to another's branch (with history)

会有一股神秘感。 提交于 2019-11-30 18:40:46
I'm working with an SVN setup with a lot of repositories. I'm trying to consolidate some by moving the trunk of one into the branch of another (the old ones are themed versions of the new one, minus some code fixes I'll be applying later, so it makes sense to me). Short version, I want to go from RepositoryA/trunk to RepositoryB/branches/RepAName. Ideally, I'd like to maintain the history. I could do an export -> import, but that loses the history and so it isn't ideal. I can't do a dump via svnadmin, since that seems it would overwrite RepositoryB (or fail, but I'm not about to risk losing

Cannot convert lambda expression to type 'string' because it is not a delegate type

半世苍凉 提交于 2019-11-30 18:14:57
In my controller i am trying to use include with EF4 to select related entities, but the lambda expression is throwing the following error, i have the related entity defined in the Entity class like public class CustomerSite { public int CustomerSiteId { get; set; } public int CustomerId { get; set; } public virtual Customer Customer { get; set; } } Then in my controller i have var sites = context.CustomerSites.Include(c => c.Customer); public ViewResult List() { var sites = context.CustomerSites.Include(c => c.Customer); return View(sites.ToList()); } Can anyone kindly point me in the right

GIT multiple local checkouts

走远了吗. 提交于 2019-11-30 17:54:59
问题 I want to checkout multiple branches of the same git repostiory on the same Computer (Linux and Windows). However as the repository might be huge, I would prefer to have the repository once and only multiple working directories. Is this possible? How so? 回答1: It is possible since Git 2.5 and its git worktree command. It replaces an older script contrib/workdir/git-new-workdir , with a more robust mechanism where those "linked" working trees are actually recorded in the main repo new $GIT_DIR

Entity Framework Generic Repository

旧时模样 提交于 2019-11-30 16:22:12
问题 I am writing a generic repository to be used for my every model CRUD operation using entity framework CTP5 as following: public class BaseRepository<TEntity> : IRepository<TEntity> where TEntity : BaseEntity { public DbContext Context { get; set; } public void Insert(TEntity entity) { if (Context.Entry<TEntity>(entity).State == EntityState.Detached) { Context.Set<TEntity>().Attach(entity); } Context.Set<TEntity>().Add(entity); Context.SaveChanges(); } public void Delete(int id) { TEntity

trying to set up tortoise svn - newbie question

梦想与她 提交于 2019-11-30 16:14:19
问题 I am trying to set up an svn on my windows computer to keep track of versions. i've downloaded tortoise svn, but am confused how to install. i can't find a good simple answer for my problem, all the manuals are fairly complicated, so please don't tell me RTFM. my problem is i set up a repository at C:\svn (using create repository here). Then I right click a folder containing my files and say import. I choose the repository "file://C:\svn" and then it gives me an errors saying "unable to open