repository

MVVM: Delete a CustomerViewModel, but how to get the Customer model inside it?

Hello, I have a list of CustomerViewModels in a ComboBox. The selected CustomerViewModel I want to delete and also the Customer wrapped inside it to remove it from the repository. But how can I access the Customer model inside the CustomerViewModel? ...

How to upgrade a 1.4.3 TortoiseSVN-created repository to 1.6.x?

A few years ago, TortoiseSVN 1.4.3 was deployed to our software development team and we are now looking at upgrading the client to the latest 1.6.x version. I had hoped this upgrade would be transparent with the additional features and modifications being client-side. For the most part, this was true except for a very important feature...

How to recreate the SVN 'format' file in a Repository?

We have been happily creating automated FAULTY backups of SVN repositories!! It turns out that we were not backing up the file 'format' in each of the repositories. Is there a way of recreating the file (and hence our repository and history) I think (hope!) that this is the only file missing. TIA Ivan Vernot ...

Subversion repository type

How can I tell if a respository uses BerkeleyDB or FSFS? ...

Where can I find project repositories with continuous testing?

I am interested in studying some test logs from different projects, in order to build and test an application for school. I need to analyze the parts of the code which are tested, the bugs which appeared in those parts and eventually how they were resolved. But for this I need some repositories from different (open source) projects. Ca...

How to best setup SVN for PHP websites?

Until now, I was always working on my own for PHP-projects, but at the moment I'm working in a small team (2-3) persons on those projects. Accidently, we did some overwriting of work from the others ... To prevent this, we thought of setting up a SVN-repository, so at least every version is stored in a safe place. Technically, the SVN i...

What's the best way to return total item count from a repository getitems method

We've got the following repository method public IList<Foo> GetItems(int fooId, int pageIndex, int pageSize , string sortField, string sortDir, out int totalItems) { // Some code } My question is: is it ok to use out in this way. I'm somewhat uncomfortable with out, but can't come up with a better way to write this as a single call. ...

Document management, SCM ?

Hello, This might not be a hard core programming question, but it's related to some of the tools used by programmers I suspect. So we're a bunch of people each with a bunch of documents and a bunch of different computers on a bunch of operating systems (well, only 2, linux and windows). The best way these documents can be stored/manage...

Does using msysgit lead to repository corruption?

While stumbling through the chromium code documentation, I came across this post: http://code.google.com/p/chromium/wiki/UsingGit#Windows If you are using msysgit, you are asking for trouble. Using both msysgit (including TortoiseGit) and cygwin's version of git is a path to lead to repository corruption so it's safer to s...

What to add to git repo?

I am doing a video player. I have the following in my project folder: these four dirs should each be on their own line: /source /sample_applications /images /videos Right now the repo just includes the /source directory...which is code only. It is on my local computer. I am thinking of adding it to git hub. My question is: should I a...

Unit testing, mocking - simple case: Service - Repository

Consider a following chunk of service: public class ProductService : IProductService { private IProductRepository _productRepository; // Some initlization stuff public Product GetProduct(int id) { try { return _productRepository.GetProduct(id); } catch (Exception e) { // log, wrap then throw ...

WCF Data Services consuming data from EF based repository

We have an existing repository which is based on EF4 / POCO and is working well. We want to add a service layer using WCF Data Services and looking for some best practice advice. So far we have developed a class which has a IQueryable property and the getter triggers the repository 'get all users' method. The problem so far have been tw...

Repository Pattern : Add Item

Just need to clarify this one, If I have the below interface public interface IRepository<T> { T Add(T entity); } when implementing it, does checking for duplication if entity is already existing before persist it is still a job of the Repository, or it should handle some where else? ...

LINQ to SQL repository - caching data

I have built my first MVC solution and used the repository pattern for retrieving/inserting/updating my database. I am now in the process of refactoring and I've noticed that a lot of (in fact all) the methods within my repository are hitting the database everytime. This seems overkill and what I'd ideally like is to do is 'cache' the m...

NHibernate + Paging + Ordering

I'm not quite sure of the most elegant solution for what I am trying to do. I have a page which lists music listings, there can be thousands of these so they are paged in batches of 20, I also have 4 links at the top of the page to change the way these listings are ordered. The sort by properties could be located on different entities ...

NHibernate does not update entity when repository is passed by constructor

Hi everybody, I am developing with NHibernate for the first time in conjunction with ASP.NET MVC and StructureMap. The CodeCampServer serves as a great example for me. I really like the different concepts which were implemented there and I can learn a lot from it. In my controllers I use Constructur Dependency Injection to get an insta...

How would you organize this in asp.net mvc?

I have an asp.net mvc 2.0 application that contains Areas/Modules like calendar, admin, etc... There may be cases where more than one area needs to access the same Repo, so I am not sure where to put the Data Access Layers and Repositories. First Option: Should I create Data Access Layer files (Linq to SQL in my case) with their accomp...

MVVM: where is the best place to integrate an id counter, in ViewModel or Repository or... ?

Hello, I am using http://loungerepo.codeplex.com/ this library needs a unique id when I persist my entities to the repository. I decided for integer not Guid. The question is now where do I retrieve a new integer and how do I do it? This is my current approach in the SchoolclassAdministrationViewModel.cs: public SchoolclassAdminist...

Mock Repository vs. Real Repository w/Mocked Data

I must be doing something fundamentally wrong. I am implmenting my repositories and then testing them with mocked data. All is well. Now I want to test my domain objects so I point them at mock repositories. But I'm finding that I have to re-implement logic from the 'real' repositories into the mocks, or, create 'helper classes' that ...

NHibernateUnitOfWork + ASP.Net MVC

Hi Guys, hows it going? I'm in my first time with DDD, so I'm begginer! So, let's take it's very simple :D I developed an application using asp.net mvc 2 , ddd and nhibernate. I have a domain model in a class library, my repositories in another class library, and an asp.net mvc 2 application. My Repository base class, I have a construct...