Questions tagged [repository]

1

votes
4

answer
20

Views

Registering IUnitOfWork As service in .net core

I am going to implement repository pattern in my asp.net core mvc application , for that i am trying my hands on a simple demo application which include repository and Unit of Work concept. My First Repository public interface ICustomerRepository { bool Add(); bool Update(); bool Delete(); } and p...
Saurabh
1

votes
3

answer
163

Views

DDD solution structure

I'm trying to create a nice a Solution structure for a new DDD project. I Created a "Core" project, where I added the Entities, ValueObjects and the repositories Interfaces then I added an "Infrastructure" project that contains the implementation of the previous IRepository. Now, since my db will be...
Davide Quaglio
0

votes
0

answer
2

Views

How get value on the basis of two input value in Dotnet core and need to call in API creation

My problem is that I want to call Course on the basis of two value get through the drop-down. Link first I selected department and the Gradelevle. Here is the schema in of Course.cs public partial class Course { public int ID { get; set; } public string Name { get; set; } public int DepartmentID { g...
Vipin Jha
0

votes
0

answer
30

Views

How to recover SVN Revision History after a “Replace” action on a File

I have completed a "replacing" action on a single file and committed it. See the TortoiseSVN "Show Log" window below. It now has no revision history. Forgive my novice level and unfamiliarity with SVN and TortoiseSVN, but I am in need of layman's instructions for restoring the revision history of a...
JohnG79
0

votes
0

answer
2

Views

Git options “git-dir” and “work-tree” not working for git subdirectory

My problem is quite easy to reproduce. In a git repository, I want to create another directory. I want to initialize this directory as another git repository, but I don't want it to be a submodule. Then, I want to add and commit files to this new repository, while being in the main one. I though I c...
Delgan
0

votes
0

answer
3

Views

Should Repository use DataMapper?

When we have different domain and persistence models it means we need to map them. I've seen most examples use DataMapper inside Repository(that works with ORM) or vice versa. Doesn't it violate SRP(Repository shouldn't know anything about mapping)? Maybe we should use some decorator for Repository...
Vahe
1

votes
2

answer
2.1k

Views

Entity Framework Repository Pattern with WPF

I have watched Mosh Hamedani's course on EF as well as read articles on MSDN. I have also read a few discussions here in StackOverflow over this. But I cannot still understand it properly. I am trying to use Entity Framework with repository pattern in WPF. Now, everywhere I see people using reposito...
1

votes
2

answer
1.4k

Views

Select specific columns in a generic repository function

We want to create a generic function which will select only required columns rather than returning the whole entity. For example I have a Country class which has the following properties. [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int CountryId { get; set; } [Required] public stri...
programer_1707
1

votes
1

answer
483

Views

Using Repository pattern - selecting specific fields of the entity for EF performance reasons

So, I am having a hard time with this Repository pattern. In lots of articles, posts and etc. I read that the repository should return only database objects(no DTOs, no mappers inside the repository).So you return single database object or list of objects. This is OK, but for EF(entity framework) p...
Gamaboy
1

votes
1

answer
890

Views

Faild to get lock in SVNRDUMP Load

I want to move svn folder to another svn folder. I used dump in old svn folder. After that I used svnrdump load to another svn folder. They are same machine different svn repo. During the load, I cut off with Ctr+C. After that I tried to load again. But the following error is returning. > Failed to...
zanhtet
1

votes
2

answer
2k

Views

Android Repository pattern

I have couple of questions about Repository pattern: If I'm using only offline database for example Room with LiveData is there any use of Repository pattern? If my app is offline right now, but will be connected to remote db in the future should I implement repository pattern or it's not going to b...
kosas
1

votes
3

answer
80

Views

Convert SQL to Linq with EF Core

I am using .NET Core 2.2, EF Core, C# and SQL Server 2017. I am not able to translate the query I need to Linq. This is the query I need to convert: SELECT TOP 5 p.Id, p.Title, AVG(q.RatingValue) AvgRating FROM Movies AS p INNER JOIN Ratings AS q ON p.Id = q.MovieId GROUP BY p.Id,...
MarcosF8
1

votes
2

answer
137

Views

Shared functionality in DDD

I'm looking at adding functionality to a DDD project but I'm unsure of the best way to fit it in. The needed functionality is tagging and user groups manipulation. As many things will be taggable (users, journals, documents etc) it seems anti-DRY to recreate that functionality in each AR. Would it b...
Chris W
1

votes
2

answer
2.9k

Views

fatal: [Errno 13] Permission denied when repo init android source 4.1

I'm trying to download android source Jellybean 4.1.1_r4. I got the permission denied as the following: Get https://gerrit.googlesource.com/git-repo remote: Counting objects: 1780, done remote: Finding sources: 100% (1780/1780) remote: Getting sizes: 100% (247/247) remote: Compressing objects: 100%...
Mick
1

votes
2

answer
733

Views

MVC / Repository Pattern - Architecture

I have a project in which I am using NHibernate and ASP.Net MVC. The application is intended to allow users to track certain data and then produce views of statistics based upon the data entered. The structure of my application thus far looks something like this: NHibernate Layer: Contains Repositor...
Ant P
1

votes
2

answer
57

Views

Adding multiple versions of a project into SVN and tagging them

I'm fairly new to the SVN thing, but am getting to grips with it. Basically I have a project already created in Eclipse, we have versions 2.1, 2.2 & 2.3 of the project saved locally on the computer. I have set up my server repository for the first (2.1) so it's in the trunk folder, and has a tagged...
Jumpernot
1

votes
1

answer
71

Views

create multiple svn repositories at once

I am migrating a bunch of existing projects (without version control) into svn. I was wondering if there is a way to create multiple repositories at once on the command line. svnadmin create repo1 repo2 repo3 etc. I realize the above wont work, since that is not the parameters expected. I know this...
johnsnails
1

votes
2

answer
283

Views

Where should I validate adding to my entity's collection property?

I'm just about to start a new pet project and I've been wondering about how I should go about validation when adding an entity to a parent's one-to-many collection. I'll use two example classes to summarize what I'm going on about a Student and a Teacher. Constraint here is that at any given time a...
Paul Aldred-Bann
1

votes
4

answer
926

Views

SVN: How to checkout two local copies of same repository

I have an SVN controlled PCB library that I use at work and at home. Files are checked out on my office workstation. To be able to work at home, I need the same files also checked out on an external HDD which I connect to the office workstation for synchronization and use on my private PC (without S...
J.Bischof
1

votes
1

answer
656

Views

Zend Framework 2 and source code repository

We created a ZF2 project with skeleton app and it works fine for a simple test application. Now we are working on a real project. My question is what we should store in the repository (SVN), the whole project structure or just the new source code? ZF2 comes with a vendor directory which is almost 31...
raj_arni
1

votes
6

answer
1.5k

Views

Can Subversion replace FTP?

We currently use Subversion to coordinate the development of our website between two developers. Between us we may work on a bunch of files, check in our changes and upload to the production server at set intervals using an FTP client. I feel like I'm missing something obvious here, but do we really...
QFDev
1

votes
3

answer
442

Views

MV4 Application with EF5 model first, without ViewModels or Repositories

I'm building a MVC4 app, I've used EF5 model first, and kept it pretty simple. This isn't going to a huge application, there will only ever be 4 or 5 people on it at once and all users will be authenticated before being able to access any part of the application, it's very simply a place order - dis...
user1956434
1

votes
1

answer
1.8k

Views

Entity Framework Cannot Get Entity and Gives “Object's Key Does Not Match..” Error

I am stucked in my project and would really appreciate any help. I am using EF 5 Code-First approach. Here is my base entity: ... public virtual Guid Id { get { return _id; } protected set { } } public virtual bool IsEnabled { get; set; } ... And my entity: ... public string CountryName { get; set;...
Kadir.K
1

votes
2

answer
3.9k

Views

how to download android open source project on windows machine?

I can't install ubuntu on my office pc so i need to know is there any way to download android open source project on windows machine ? How ? Thanks.
Armin
1

votes
1

answer
1.3k

Views

Generic Service Implementation

In my learning ASP.NET MVC 4 application, I use repository pattern and service layers. Entity framework and Autofac is used in the project. My data classes are simple and almost all operations are basic CRUD operations. I have an abstract repository base as: public abstract class RepositoryBase wher...
SherleyDev
1

votes
2

answer
118

Views

Setting up git after fresh install

I'm planning to install mountain lion on my macbook pro and erase everything in my hard drive too. I currently have git installed with a few repos and my ssh key is connected with remote repos as well. I'm not sure how to go about restoring everything after the fresh install of osx. I am not very pr...
KT.
1

votes
1

answer
706

Views

Repository pattern's answer to complex / non-model specific queries (i.e. reporting / aggregate data)

I've been reading up on the Repository Pattern and struggling to find a solid answer on how people approach situations where the data returned isn't just your standard models (i.e. NOT Customer 1..* Account) I'm building an analytically system which returns data that is aggregated, sometimes spannin...
Ryan Griffith
1

votes
2

answer
3.8k

Views

Create new Gerrit project from pre existing git repository

I'd like to introduce Gerrit on the project I'm working on. At the moment we already have a git repository with some code committed on it. I've initialized the project as follows: java -jar gerrit-full-2.5.2.war init --batch -d gerrit-codereview cd gerrit-codereview/git git clone --mirror [email protected]
Giovanni G
1

votes
3

answer
500

Views

How to mass change tab width for all JS files across entire repository?

We're doing some code clean-up on a project I'm on that's grown rather large. We've decided that site wide all tabs (which are soft tabs of four spaces) should be two-spaces standard (there's been a lot of mixing). Is there an easy way to accomplish this? We're talking hundreds of JS files here. I'd...
Jesse Atkinson
0

votes
2

answer
85

Views

DataAccess layer to return domain objects in case of Ado.net?

I am creating a project in which I will using ADO.NET as data access layer to interact with database. Now the thing where i am pretty much confused is with : 1) Shall I have domain objects in this application? 2) Does my sql query result should always be binded with domain objects ? 3) If I dont us...
Mr Bean
1

votes
1

answer
1k

Views

Maven: antrun plugin builds JAR file -> How can i install/deploy it in my repository?

I am in the middle of an Ant -> Maven migration project and I have a question (I'm not really a Maven expert), since I'm stuck at a particular point: Within one of my pom.xml files I have to use the maven-antrun-plugin to call an external ANT file, which builds a jar file and puts it in a temporary...
softandsafe
1

votes
2

answer
1.6k

Views

Git merge with cloned projects (best practice)

I'm looking for the best practice for working with GIT. Here is my problem: I have a BASE project and, for each client, I clone it. Because those projects will be very similar (only changes some config files and images), and each web project will be stored in a different directory. So I think the be...
Dani Sancas
1

votes
2

answer
1.5k

Views

Restructuring Files in Git Repository

I have a Git repository with the following folder structure: allprojectfiles --otherfolders --source ----projectname ------projectname ---------git initilalized here ---------otherfolders ---------workingonthesefiles(bound to remote) Can I restructure the project to have Git track from the allprojec...
Xdrone
1

votes
2

answer
111

Views

What is a Node and a Property in content repository?

I am reading about content repositories and I am currently reading the JCR specification and the documentation found on Apache JackRabbit. However, I still don't understand what exactly I am going to store in the Node's and Properties. I know that the actual data goes in the properties. But I don't...
LuckyLuke
1

votes
1

answer
34

Views

3rd Party Libary jars analysis required [closed]

Is there any way to do analysis of 3rd party java library jars. There huge set of jars being used by application of obsolete version but stable. Is there any way to find out report which shows what are my repository version is and what is market latest jars... i just don't want to keep version as la...
Maulzey
1

votes
2

answer
1.6k

Views

Generating release notes in Rep. in GIT

I am having a repository in which I would like to mention in it, in every changes, release notes and log file. How to generate those files?
MelMed
1

votes
1

answer
593

Views

Repository and bulk update - avoiding database roundtrips

I work on wholesale system domain. When some products are delivered, domain NewProductsDeliveredEvent is triggered. Event contains set of ProductDelivery value objects containing product code and quantity. Something like below: class NewProductsDeliveredEvent { Set productDeliveries; } class Product...
woof-woof
1

votes
2

answer
713

Views

How do you use type arguments in a Spring Data custom method implementation?

Per the Spring Data Commons documentation, adding a custom method implementation to a Spring Data repository is quite simple: interface UserRepositoryCustom { public void someCustomMethod(User user); } class UserRepositoryCustomImpl implements UserRepositoryCustom { public void someCustomMethod(User...
Nick Williams
1

votes
2

answer
2.9k

Views

How to integrate a Linq to Entity query that queries multiple entities in a repository and send data to View?

I'm learning MVC, the repository pattern and EF and I need some advice as to how best to integrate a method which contains a query that queries multiple entities into the repository. At the moment, I have created a repository class which implements an interface and uses an instance of DbContext to...
Colin Roe
1

votes
1

answer
111

Views

Avoid include duplication in EF

I have two methods with same include part(these methods only for describe problem) public Car GetCarByChildEntityId(long id) { var query = DataContext.AsQueryableFor() .Where(rb => rb.Id == id) .Include(rb => rb.Car.CarStatus) .Include(rb => rb.Car.item.Customer) .Include(rb => rb.Car.item.MyItem.Wh...
cosset

View additional questions