repository

Generic Repository with nHibernate

让人想犯罪 __ 提交于 2019-12-22 18:27:39
问题 I currently have this class make up for my Generic Repository public abstract class RepositoryBase<T> where T : class { private readonly ISession session; public RepositoryBase(ISession session) { this.session = session; this.session.FlushMode = FlushMode.Auto; } public void Start() { this.session.BeginTransaction(); } public bool Add(T entity) { this.session.Save(entity); return true; } public bool AddAll(IEnumerable<T> items) { foreach (T item in items) { this.session.Save(item); } return

Xcode 5 How to go to Repositories window?

江枫思渺然 提交于 2019-12-22 14:42:53
问题 In previous XCode versions(4) I was able to click on Xcode and it would have Source Control -> Repositories Now they have moved Source Control as a new drop down menu but it does not have Repositories part where I could check my SVN and see all other projects. Is there a way to open Repositories window? 回答1: Create New Project then check Source Control then Menu Bar -> Source Control New Accounts preferences pane for managing Apple IDs, repositories, and continuous integration servers New

Service Layer are repeating my Repositories

社会主义新天地 提交于 2019-12-22 11:44:27
问题 I'm developing an application using asp.net mvc, NHibernate and DDD. I have a service layer that are used by controllers of my application. Everything are using Unity to inject dependencies (ISessionFactory in repositories, repositories in services and services in controllers) and works fine. But, it's very common I need a method in service to get only object in my repository, like this (in service class): public class ProductService { private readonly IUnitOfWork _uow; private readonly

Is injecting service into another service bad practice?

怎甘沉沦 提交于 2019-12-22 11:34:01
问题 I am creating a web application that is tiered in the following way: Controller > Service > Repository So it's following a service and repository pattern. Let's say I have 2 entities Product and Page like so: public class Product { public string Name { get; set;} public Page Page { get; set; ) } public class Page { public string Name { get; set;} } Each of these entities have a repository like so: public class ProductRepository { public Product GetProduct(int productId) { // code } } public

git - only fetch the files, not the history

十年热恋 提交于 2019-12-22 10:47:02
问题 when I am running git pull or git fetch , I obviously retrieve both history and files. For huge projects, that takes very much time. I wonder how this process could be sped up, as for some projects I am only interested in the source code and not in the history. Is there a way to tell git that I only want to fetch the current snapshot of the files and not the whole history as well? 回答1: You probably want to look at the --depth option in git clone --called a "shallow clone". In particular, you

using a private github repository to host a private maven artifact

柔情痞子 提交于 2019-12-22 09:48:46
问题 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 public: <repositories> <repository> <id>company-core-mvn-repo</id> <url>https://raw.github.com/company/company-core/mvn-repo/</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> </repositories>

Using SVN alone or in small workgroups - workflow approach?

本小妞迷上赌 提交于 2019-12-22 08:24:17
问题 I have spent some months working on a web application and we're come close to production stage. It's soon time to expand the development group with 1-3 people on this project. I have not too much experience on working with SVN, but It's obviously the choice for a big part of the larger companies out there, so I am guessing that the pros of SVN without a doubt outweights the time spent on commit/check ins / check outs etc. The workflow seems to become a bit more complicated with SVN, and even

How to add tags/trunk/branches to established SVN repo?

落爺英雄遲暮 提交于 2019-12-22 08:08:07
问题 Lets say you have an established SVN repository with many hundreds of revisions and has been around for upwards of a year. The repository does not have the standard tags, trunk and branches at the top level. Instead it just goes straight into the code. Is there a way to add in tags , trunk and branches to the repository on the top level without just checking out the entire repository, altering the directory structure and then committing? Is there anyway to add it in recursively so that if you

jdbc4.MySQLSyntaxErrorException: Table doesn't exist in database

左心房为你撑大大i 提交于 2019-12-22 07:58:07
问题 I'm developing a web app using SpringBoot, and this is my application.properties file to specify the credentials to access to the database: spring.datasource.driverClassName=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://127.0.0.1:3306/Salamander spring.datasource.username=root spring.datasource.password=root spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect but when I try to run the SpringBoot app, it gives me

Re-indexing repository loop - not Maven

人盡茶涼 提交于 2019-12-22 04:55:06
问题 My Eclipse is continuing crashing a running a loop that saying re-indexing repository [myusername] I think it is because of github but I have unchecked everything that could be causing the problem in eclipse preferences under Maven and GitHub. Can someone please help, my computer keeps heating up and crashing. Thanks 回答1: First alternative: Git only Disable the Refresh settings under Window -> Preferences -> Team -> Git. If that works, you will have to manually refresh either the workspace or