Click here to Skip to main content
15,887,886 members
Everything / Repository

Repository

repository

Great Reads

by Victor Dashevsky
Processing the positioning information of visual objects detected by Pixy camera and received on Raspberry Pi via I2C, and using common design patterns in a C# program parsing robotics sensor data
by Daniele Fontani
Implement a private Wordpress reposiotory using Angular and PHP slim framework as backend
by Shaun C Curtis
Rethinking the Repository Pattern
by Sunny Makode
This is an introductory article about creating an Odata Rest API in collaboration with Entity Framework. We are also going to use Autofac as our IOC container. Also, Repository and Unit of Work pattern will be used for cleaner access of persistence model through our ORM (Entity Framework).

Latest Articles

by Divya Ulasala
Check out remote Git branch that does not exist on local clone
by Bert O Neill
How to incorporate repository pattern
by Shaun C Curtis
Rethinking the Repository Pattern
by Daniele Fontani
Implement a private Wordpress reposiotory using Angular and PHP slim framework as backend

All Articles

Sort by Updated

Repository 

19 Dec 2023 by Richard Deeming
Since your repository code is swallowing all exceptions - an extremely bad idea, by the way! - the only reason for a NullReferenceException would be that the baseRepository is null. Check the constructor to make sure you've assigned the field...
18 Dec 2023 by A Belal
in Repository Pattern System.NullReferenceException Delete Method System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=Microsoft.EntityFrameworkCore StackTrace: at...
18 Dec 2023 by M Imran Ansari
As the error message, the issue is in Delete method. The Delete method attempts to remove an entity from the context using LapShopContext.Set().Remove(entity). However, the error you're encountering is a NullReferenceException, which suggests...
2 Feb 2023 by Divya Ulasala
Check out remote Git branch that does not exist on local clone
4 Jan 2023 by Bert O Neill
How to incorporate repository pattern
19 Dec 2022 by Shaun C Curtis
Rethinking the Repository Pattern
9 Dec 2022 by Daniele Fontani
Implement a private Wordpress reposiotory using Angular and PHP slim framework as backend
25 Oct 2022 by ♥…ЯҠ…♥
Hi All,I am using Visual studio 2010 ultimate, now I want to add AnkhSVN to visual studio for that I downloaded the same from internet and installed.Then only I noticed I cant find Source control option in Tools --> options menu.Only 4 options are listed below that1) General2)...
25 Oct 2022 by Suchitra Kuchipudi
Tools->Options->Web Forms designer->enable legacy webforms designer and Source view ->OK ->Restart the system It will display the Source button in bottom of editor
29 Jun 2022 by Atul Joshi 2022
For an attribute which need to be validated, lets say for an entity we have country field as VO This country field needs to be validated to be alpha-3 code as per some business logic required by domain expert. ***We need to persist this country...
1 May 2022 by PascalLandau
How to setup git-secret to store secrets directly in the repository
4 Jan 2022 by jaideepsinh
I have on-premise GitLab repository so i have configured vpn to access this repo. Now i want to import my this repository to Azure Git repository. I have enough credential gitlab user name and personal access token but unable to import because...
27 May 2021 by jaideepsinh
how to commit files into azure git repo using build pipeline. I am generating some files from my azure ci pipeline and I want to commit those files into the same repo which I used in my ci pipeline. What I have tried: I have added azure cli...
27 May 2021 by jaideepsinh
"git remote set-url origin https://username:gitpassword@repository url" git checkout trunk git add . git commit -m "test commit" git push -u origin trunk
15 Mar 2021 by Arun Endapally
How to migrate your old repositories in TFVC to Git with full history
15 Mar 2021 by huynbt209
I am having a Semester1 including StartDate1 and EndDate1. I want to create a new Semester2 and it must ensure EndDate1
14 Mar 2021 by OriginalGriff
What you are comparing isn't a pair of DateTime objects - it's (probably, we can;t see your code from here) a DateTime on the right hand side of the comparison, but the left hand side will be a collection of Semester objects. Try it: split your...
14 Mar 2021 by Arun Endapally
Setting different Git Config at folder level for work and personal use.
11 Jan 2021 by Benktesh Sharma
How to create, modify and update Docker image from container
8 Jan 2021 by xhon
I created a new project on my dev.Azure.com account, linked my solution to it, and opened it with Visual Studio. My Visual Studio solution is inside the correct path, the .git and .vs folders are there and I can see all the files on Visual...
13 Nov 2020 by xhon
I'm using Git and I stored my remote repo on a SaaS. I renamed the project folder both on my local machine and in the page of my remote repository. Now I'm on Git bash and I checked out to master from the new directory by writing the following...
12 Nov 2020 by Virendra S from Bangalore, Karnataka
My local branch name===> (Development) $ git status On branch Development Your branch and 'origin/Development' have diverged, and have 3 and 5 different commits each, respectively. (use "git pull" to merge the remote branch into yours) nothing...
12 Nov 2020 by Richard Deeming
git - master branch and 'origin/master' have diverged, how to 'undiverge' branches'? - Stack Overflow[^] You either need to merge or rebase. Git - Rebasing[^] To rebase: git pull --rebase
23 Jun 2020 by m.bleimuth
i am searching the web now for a while without real success. Lets assume following simple model, which i get from a webservice. public class A { public int Id { get; set; } public ObservableCollection Bs { get; set; } public A () {...
14 Jun 2020 by mohsen_3325
i have this entity framework code: repository.GetObjectQuery(Of COUNL1)().Where(Function(a) a.CDATE >= "2012/01/01" And a.CDATE
1 Jun 2020 by Richard Deeming
I'm not sure about "best practises" - there are many different ways to achieve the same thing, with varying degrees of complexity. What I tend to do is return a class which encapsulates the results: public class EntityList { public...
1 Jun 2020 by sam_roy
I am using a generic repository something like EFRepo which has a method public IEmerable GetAll( Expression> filter = null, Func, IOrderedQueryable> orderBy = null, ...
8 Dec 2019 by Sunny Makode
This is an introductory article about creating an Odata Rest API in collaboration with Entity Framework. We are also going to use Autofac as our IOC container. Also, Repository and Unit of Work pattern will be used for cleaner access of persistence model through our ORM (Entity Framework).
2 Oct 2019 by Christopher Fernandes
I currently use Visual SVN for managing my project in visual studio 2012. I have around 8 repos in the server. Revision history of the project range from 7 to 72. I just recently backed up the working copy of each project on my external hard drive. My project server for some reason wont boot up...
16 Sep 2019 by Simphiwe_Magubane
When the user chooses an item to purchase they should be able to specify the quantity and the total is specified, the problem is that the quantity does not increase and I don't seem to understand what can be the cause of that. What I have tried: I have tried fixing it because I thought it...
25 Aug 2019 by Member 11380736
I'm trying to create a dynamic architecture for a Audio/Video player application. I want to be able to change the type of playlist and type of repository from inside the ioc container. This should be injected in constructors around the application: IPlaylist playlist,...
14 Jun 2019 by stally7074
i am looking forward to use google source code repository. and i want help for that.i searched for its tutorials on youtube but i found nothing. What I have tried: i searched for tutorials on youtube
14 Jun 2019 by OriginalGriff
Forget Youtube tutorials: they are nearly all a waste of time and effort. Mostly produced by people who can't teach, let alone create a video; they feature people who know little more than the person watching it... If you want info on Google products, start with Google: Google Cloud Source...
14 May 2019 by David_zeng
var data = from a in tablename.groupby(a=>a.cdate) .select (al => new datamodle{expr1=sum(al.first().taotalvj,cdate=al.first().cdate) });
3 Apr 2019 by Mahsa Hassankashi
This is the simplest tutorial on AngularJS and Repository Pattern for developing professional MVC applications. It includes a source code about practical permission management project.
13 Feb 2019 by K K Shah
I want to get a size of Entity Class - which is fetched from database using Repository. How to do so using Vb.net ? Below Line is calling GetEntity Method which is in my InwardService. Dim Inward As ARI.PurchaseTranEntity.InwardOutward = _InwardService.GetEntity(id) So what i want to get the...
13 Feb 2019 by Gerry Schmitz
1) Create a stored procedure of your "SQL Query" 2) Add a method to your "repository" that calls said procedure with a "table name" parameter and return the result as a string scalar.
7 Dec 2018 by kubibay
We have an MVC project which is written in c#. We are using entity framework to connect with sql db. I use repository pattern with service implementation in our project. Manual db updates do not reflect to get queries of repository. How can I force ef get latest data? private readonly...
7 Dec 2018 by Richard Deeming
It sounds like you're using a single DbContext instance across the entire application. Once an entity has been loaded by a DbContext instance, it will be cached for the lifetime of that instance. Any attempt to read that entity from that instance will return the cached value, ignoring any...
30 Nov 2018 by UA12
these are the errors. Quote: qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_new qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init qt.network.ssl: QSslSocket: cannot...
18 Nov 2018 by kubibay
We are using repository pattern in our mvc project. But I'm unable to implement service in quartz jobs. Here is the code; [DisallowConcurrentExecution] public class DeleteContentsJob : IJob { private readonly IAttachmentService attachmentService; public...
8 Nov 2018 by Member 13947747
I am developing an application with ASP.NET MVC using Visual Studio 2017 applying the Code First approach. I have three classes (tables) in the model and I am trying to create a class that simulates the BD. I'm trying to store data in memory without using db. I don't now how to add new item?...
8 Nov 2018 by Vincent Maverick Durano
You may try to look at Effort to test your app without a real database. Here's an example: Using an In Memory Database as a Test Double with Entity Framework - Steve Fenton[^]
11 Oct 2018 by F-ES Sitecore
Add is a method that takes two type params container.Add(typeof(ICategoryRepository), typeof(CategoryRepository));
11 Oct 2018 by Lokesh Zende
Hi, I have below classes and interface implementation public interface IPageRepository : IRepository { IList GetPage(Criteria criteria, out int totalRows); } public interface ICategoryRepository : IPageRepository { // rest of the methods } public class...
8 Jun 2018 by bernova
I want to implement Save Operation(Insert/Update) as follow: Emp n = new Emp(); n.Srl=1; n.Name = "Mathew"; n.Save(); I should pass entity as the parameter to save Function and it's run correctly but really Ugly!!!... example: n.Save(n) Model Class : public class Emp...
26 May 2018 by Victor Dashevsky
Processing the positioning information of visual objects detected by Pixy camera and received on Raspberry Pi via I2C, and using common design patterns in a C# program parsing robotics sensor data
21 Apr 2018 by Wade Harvey
This article shows how to use Winforms, WPF and C# to create a File Explorer Clone with Tabs and an extremely fast parallel file search utility.
7 Apr 2018 by Richard MacCutchan
See generic repository concrete repository - Google Search[^]
7 Apr 2018 by Dinesh Singh Kushwaha (Dev)
I have seen many programmer say that generic repository is best many programmer say concrete repository is the best. What i feel concrete repository is the best because it is more readable , maintainable and easy to understand than generic repository although we have to write more code to...
20 Mar 2018 by saifullahiit
I'm Trying to update entry using EF 6.0, and generic repository. here is my base class code: public virtual void Edit(T entity) { _entities.Entry(entity).State = EntityState.Modified; _entities.SaveChanges(); } public virtual T GetById(int id) { ...
3 Feb 2018 by Onur ERYILMAZ
Hi; I need to change an already developed desktop application.(Application developed by using winforms) The application have already designed UI's with seperate UserControls(ex. PriceOfferRequestUserControl, OrderUserControl etc.), database tables and models. What I want to do is implementing...
3 Feb 2018 by fastal
OK manifesto here!!! Implementing MVP into an existing 1-layer app app is a rewrite. I wouldn't recommend that unless you have no backlog, and lots of testers for the app. Otherwise, polish off your resume, unless your boss is expecting a re-write and all the delays and retesting that go with...
25 Dec 2017 by Onur ERYILMAZ
Hi, I want to ask a few questions about EF and repository design pattern implementation. I'm very new to EF and I want to learn more about that. I already have a database and tables inside of it. So, I don't want to entity frameworks re-generate this tables.(So I have to use DB First approach...
25 Jul 2017 by Member 13206142
If you want to create code first approach then follow below code to create generic repository pattern [Table("Categories")] public class Category { [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity), Key()] public int Id { get; set; } [Required] ...
25 Jul 2017 by hkholakiya
How to create architecture with Generic repository in Asp.net mvc What I have tried: Wanted to created generic repository for my MVC project
1 Jul 2017 by Morny
Hi I’ve come to the conclusion that a C# MVC 5 project (using Entity framework, code first and migrations) I’m working on has grown too big to fit the “out of the template” structure. I’m trying to build a site where the public part at the site is placed in the “root” or where a site build on...
1 Jul 2017 by RickZeeland
These seem like hands-on articles on the subject: An Absolute Beginner's Tutorial on Dependency Inversion Principle, Inversion of Control and Dependency Injection[^] Inversion of Control, Dependency Injection and Service Locator in C# – CsharpStar[^] Inversion of Control and Dependency...
24 Apr 2017 by SlavaUtesinov
Implementation of "insert" repository with dynamic database table (re)creation, if it not exists. It is possible to specify which migrations will be used for that otherwise will be used default creation logic. Usage example - dynamic logging and archivation or manual table creation for some purposes
20 Apr 2017 by Vishal Pand3y
I'm trying to setup Unit Test in services using Moq and NUnit I tried Mocking context and DbSet like var mockSet = new Mock>(); var mockContext = new Mock(); mockContext.SetupGet(m => m.Student).Returns(mockSet.Object); but my services depends on other service...
14 Mar 2017 by Sabyasachi Mukherjee
I am using Entity Framework 6 in WPF. I have already created a Repository which returns list of entities to the Viewmodel. Since I need to bind these lists to the DataGrid, I have converted these to ObservableCollection. It needs to be done so that the change tracker of EF6 can detect the...
14 Mar 2017 by Graeme_Grant
Google Search: wpf c# mvvm entity framework binding - Google Search[^] has a number of links that can answer your question regarding the DataGrid EF binding:* Tutorial for a Basic WPF – MVVM Project Using Entity Framework - Code Project[^] * Windows Entity Framework MVVM Walk Through 1...
13 Mar 2017 by Sabyasachi Mukherjee
have watched Mosh Hamedani's course on EF as well as read articles on MSDN. I have also read a few discussions 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 repository pattern in...
16 Nov 2016 by syed shanu
In this article, we will see in detail how to create ASP.NET Core with Repository pattern in the WEB API.
10 Oct 2016 by Ashley Davis
A look at version control from the game developers perspective
3 Oct 2016 by Mark W Solomon
In this article, I developed a way to determine all the SQL Servers in our environment at will and filter this information into Microsoft's Sunset report for Microsoft SQL Server and present all this information in an SSRS report.
8 Sep 2016 by Dave Kreskowiak
Ever heard of Google, or a any search engine for that matter?You can find all this stuff yourself quite easily.
6 Sep 2016 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
5 Mar 2016 by zonkerman2
I am working on an N-Layered design application using WinForms. My application has 4 layers identified as follows: Presentation Layer Application Layer Domain Layer Infrastructure Layer (Persistence with repositories) What are some recommended approaches to performing validations...
19 Nov 2015 by Krunal Rohit
An addition to what F-ES Sitecore (wondering the name :laugh:) has said, refer the ASP.NET MVC[^] site, follow the tutorials. Or maybe the Google[^] would help you.-KR
19 Nov 2015 by F-ES Sitecore
You're not going to learn such a complicated language from a "Quick Answer" on a forum. Buy a book on MVC and go through it. Wrox do some comprehensive books, but there are others too.
19 Nov 2015 by JagadheeshAP
Hi Everyone, I am very new to MVC-4..Previously I worked as a software developer in ASP.Net...Can anyone tell me how to learn MVC-4 Professionally...And also I need to know why we are using model,datamodel,repository.... Thanks in advance
20 Sep 2015 by Aaronman7155
I need to Update a record in my Generic Repository Application..... Using Code first.
10 Sep 2015 by Naresh Kumar
Is it possible to implement Unit of Work with Generic Repository if my application is having multiple contexts and each context referring to different database. If So? Could you please provide an example.Any help will be highly appreciated.public class GenericRepository where...
29 Jul 2015 by Member 11717321
Could anyone give some advice, for the best possible way to implement this solution. My program does do a basic insert, but trying to get Items added to the Job Card is my big problem.ThanksController: IJobCardBusiness iUser; ApplicationDbContext _context =...
24 Jun 2015 by Albert Holguin
Google provided an answer quickly.http://www.cs.columbia.edu/crf/crf-guide/resources/network/cvs-ssh.html[^]If there is something there you don't understand, ask, but please try to find online resources first before asking questions.
24 Jun 2015 by pyler
I want to download some "*.c" and "*.java" files onto my dektop from a server I connected to via ssh. CVS is the only currently supported version control system on the server and I'm not very familiar with it.So how do I checkout files/folders from the server onto my desktop using cvs?
17 May 2015 by PrabalMI
I am having problems saving data when many to many relation is involved. I am using Repository pattern in Entity Framework Code First approach.Sample code is as follows:public partial class Employee : BaseEntity { private List _roles; [DataMember] ...
30 Apr 2015 by Jamie Munro
Why the repository pattern
17 Mar 2015 by Akhil Mittal
Unit of Work Pattern and Repository Pattern, and how to perform CRUD operations in an MVC application.
17 Mar 2015 by Akhil Mittal
How to create MVC application and perform CRUD operations using EntityFramework
24 Feb 2015 by Dave Kreskowiak
OK. Weird. You do realize you won't be able to write anything back to the database, correct?If you had, in your original solution, all of the EF code in a seperate project(s), completely seperate from the application code, you wouldn't have to recreate everything in your new solution. You...
24 Feb 2015 by Biswabid Rath
I want to reuse an existing project code. I have all the POCO classes(replica of tables) available with me from the old project which is attached to DBCOntext also. However in my new project my DB structure is different. I am planing to replace the old POCO classes with new ones with same...
17 Feb 2015 by junaidshaikh
Hi,I'm new to Entity framework and Repository pattern. I'm trying to implement Repository Decorator pattern which contain basically Auditable and Archivable classes and extends the Attribute class. But when I add them on any entity class as: [Auditable] public class Student{ ...
8 Dec 2014 by Suraj Sahoo | Coding Passion
SO Discussions[^]Implement Repository and Unit of Work[^]Look into the first link for your answer and the second one to get more idea on how to access two different context.Post back queries if any.Thanks
8 Dec 2014 by sudesh1456
I'm getting error after this join. Normal linq query working fine. I'm using database first approach.When I'm collecting data from more than one table its throwing exception. The specified LINQ expression contains references to queries that are associated with different contexts.public...
22 Nov 2014 by vedatg1980
In our project we are using-Entity Framework - Repository Pattern + Unit of Work Pattern together + We are using Devexpress controls.The related part of the code for initializing our grid is:UOW = new RepositoryObject.Core.UnitOfWork();repXtraGridAddXtraEditor = new...
28 Oct 2014 by King Fisher
This May help youCascading Dropdown List With MVC, LINQ to SQL and AJAX[^]Edit:http://www.dotnet-tricks.com/Tutorial/mvc/HL53191212-Custom-Validation-for-Cascading-Dropdownlist-in-MVC-Razor.html[^]
28 Oct 2014 by Suraj Sahoo | Coding Passion
Anticipating that you know the code to be written, I am writing you the flow and steps to follow in Repository pattern.First, Always try to add the context code i.e. the database operations in the Service or Repository whichever you have. Context operations should not be added to the...
28 Oct 2014 by JOTHI KUMAR Member 10918227
hi to all, Here i want to populate Country and Automatically Load State and load city .Kindly help me for this then im using mvc 5 Repository pattern.Where to write that code in repository or controller. Because im new for mvc.
10 Jun 2014 by gt.guybrush
Searching on StackOverflow and google i find many and many different implementation but none of that really convinced me, each had some small defect that prevented me from using it. So I tried to create my own version and would like to know what you think.Essentially everything is based on...
28 May 2014 by Keith Barrow
Has wcf created from Repository pattern?No. Classes/interfaces are more of a Object oriented construct, in this case a VB.Net or C# language thing and is in more general use. Often patterns make use of Interfaces and class inheritance to work, but not specifically to the repository...
28 May 2014 by DGKumar
In wcf Interface and classes and Repository pattern Using Interface and Classes except names both are seems same.Has wcf created from Repository pattern?
27 May 2014 by Rajesh R Subramanian
Yes, one database for all of your data.The data limit will be:> 4 GB if you use SQL Server 2008 Express > 10 GB if you use SQL Server 2008 "R2" Express editionUnless you're checking in large files (binary files of any kind), 10 GB is normally a pretty good limit for a 5 user project.