repository

How to use a maven 1 repository with maven 2?

纵饮孤独 提交于 2019-12-04 13:23:28
I am having problem building my project (using maven 2) which references some jars from a maven 1 repository. The scenario: My company has a private maven 1 repository that has the following info: <url>http://my-company-maven1-repo/maven-repository<url> It has the layout of: maven-repository |_repository |_ .... |_ .... |_vectorgraphics |_jars |_freehep_swing-2.0.3.jar |_freehep_io-2.0.2.jar What I have tried: 1. Following the guide here: relevant maven official docs My mvn2 pom.xml: <repository> <snapshots> <enabled>true</enabled> </snapshots> <id>my-repo</id> <-- I made up a temporary id

How to add description for a repository in Gitolite configuration

ε祈祈猫儿з 提交于 2019-12-04 12:50:10
I am using gitolite for user maintenance for my GIT server. Everything works fine except repo description. I have setup the description for a repo like "reponame = repo description" in gitolite.conf. Earlier version (before v3.x) its working. Now its not working. For your information I am using gitolite v3.1 GIT v1.7.1 Perl v5.10.1 Here is my gitolite.conf file http://pastebin.com/DYCK3uRL or http://arulraj.net/gitolite.conf . The post-receive-email mail subject and signature not have description because of that repo description file not generated automatically using gitolite. How can I fix

Repository Pattern and Linq to sql

谁说我不能喝 提交于 2019-12-04 12:30:12
I 'm trying to implement user authentication and authorization using roles table, user table and a xref table having userid, roleid. For implementing generic repoistory to update role, insert role, add user, add user to role, update user, update user role, authenticate user, add user session to audit etc do i have write seperate functions for each or can i use one generic method for similar functions. There are some other operations like joining user to other table and get top 5 rows based on conditions, Inserting in 3 tables (joined on a key) using single form etc I'm confused reading many

MVC3 Design - repository pattern and services layer [closed]

隐身守侯 提交于 2019-12-04 12:02:41
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . I have read a couple of books and articles on MVC, and come across the repository pattern and the services layer. Should a controller be able to get entities through the repository pattern, or must it retrieve data from the services layer? Edit: I have code in the services

Creating a Generic Save() Method for Models

試著忘記壹切 提交于 2019-12-04 11:52:20
I have a fairly simple system, and for the purposes of this question there are essentially three parts: Models, Repositories, Application Code. At the core are the models. Let's use a simple contrived example: public class Person { public string FirstName { get; set; } public string LastName { get; set; } } In that same project is a generic repository interface. At its simplest: public interface IRepository<T> { T Save(T model); } Implementations of that interface are in a separate project and injected with StructureMap. For simplicity: public class PersonRepository : IRepository<Person> {

Responsibilities of Service and Repository layers

a 夏天 提交于 2019-12-04 11:23:39
问题 Just trying to get my head round the responsibilities of the service layer and repository layer when saving an object to my persistence store. My current under standing is this: In my controller I have created a "Note" object from the data submitted by the user (from the form). The user then calls "Save" on the "NoteService" (which is there via dependency injection). Within the "Save" method on the "NoteService" I carry out my business logic validation and then pass the "Note" object to the

Unit Testing Entity Framework

依然范特西╮ 提交于 2019-12-04 11:15:26
I have just started using Entity Framework(v4) and Linq. I have a Entity data model, which has been generated from a database. I have then implemented repository classes in order to implement the business logic for my entities and they contain my LINQ queries for interacting with the entities/database. What is the easiest and simplest way to unit test the methods/functions in my repository classes without hitting the database? marto You can run your tests against an inmemory database. Check this question Find a framework that would allow you to create a mock-up repository. This will take time

Best way to approach tying in Entity Framework 4 (“Database First”) and MVC3

这一生的挚爱 提交于 2019-12-04 11:05:54
I am a relative newcomer for C#.Net (.net 4), EF4, Winforms, and MVC3. I had laid out a database in SQL Server in the process of developing a Winforms "backend" for a task I have been assigned. I setup a single Solution and created a .edmx from the database as its own project/assembly in the solution. Also in the solution is the winforms app that references the .edmx assembly. Using the default EF4 code generation, I built out the Winforms app and all is well there. Now, I have to build out the enduser web frontend. I want to use MVC3. I have been through MVC3 tutorials on Pluralsight and

r sourcing private repos from github

一个人想着一个人 提交于 2019-12-04 10:14:39
Hi I was wondering how to source private repos in github that I have been given access to. Using the devtools package, it is easy enough to source open repos by using commands such as: source_url('https://raw.github.com/hadley/stringr/master/R/c.r') but doing the equivalent with the URL for a private repo doesn't seem to work. P.S. I know I can clone the whole repo, and then get the file that way, but I'm looking for just one specific file in the whole repo to take, and it's a bit inefficient to clone the whole thing, copy the code and the use it as necessary. I'm not really familiar with R,

Repository pattern with EF4 CTP5

别来无恙 提交于 2019-12-04 09:57:06
问题 I'm trying to implement the repository pattern with ef4 ctp5, I came up with something but I'm no expert in ef so I want to know if what I did is good. this is my db context public class Db : DbContext { public DbSet<User> Users { get; set; } public DbSet<Role> Roles { get; set; } } and the repository: (simplified) public class Repo<T> : IRepo<T> where T : Entity, new() { private readonly DbContext context; public Repo() { context = new Db(); } public IEnumerable<T> GetAll() { return context