Click here to Skip to main content
15,893,588 members
Everything / Dependency

Dependency

dependency

Great Reads

by Fiyaz Hasan
Learn how dependency injection mechanism has evolved from ASP.NET to ASP.NET Core
by Habibur Rony
This will cover how to use Domain Driven Design in your application according to the Onion Architecture. There are short descriptions about architecture Category / Style, N-Layer / N-Tier Architecture, Template Method Pattern and Facade Design Pattern.
by GProssliner
cobj is a preprocessor based generator for interface based polymorphism
by Hein Pauwelyn
This is an application made for Windows (Universal) 10 devices made with MVVM, IoC-containers and dependency injection. There is also an API from Yahoo and SQLite service.

Latest Articles

by Matteo Prosperi
Being an engineer on the AWS SDK for .NET team, I tasked myself with figuring out how to use our libraries under Blazor in the browser.
by Chinmaya C
Explanation about DIP and its need in the real time scenario
by L. Michael
This article provides a recipe on how to avoid producing legacy code at the speed of typing by using a proper architecture and unit testing.
by Sharp Ninja
Simple Dependency Injection, the customizable way. Learn about the SimpleDI framework for creating simple and effective dependency injection.

All Articles

Sort by Updated

Dependency 

23 Nov 2023 by Richard MacCutchan
See my comment to your duplicate of this question.
23 Nov 2023 by PinkGoat_
I'm having some issues here. So I wrote this method in a class named MainWindow, that exports logs of an app to a txt. Honestly I dont know if its good but anyways we will see. public void exportLogs () { string logsFolder =...
10 Oct 2023 by OriginalGriff
If you have two projects called A and B, and A references B while B also references A which do you build first? If you build A, then B you end up with A being out of date because B has changed. But when you build A, B becomes out of date so...
9 Oct 2023 by Maloda 2022
Using WildFly 29, I followed the quickstart guide for the EJB-Multi-Server at the wildfly quickstart github Let' s supposes I have two EJB projects A and B I am already able to call B from A via a JNDI lookup But when I setup B to be able to...
17 Aug 2023 by temuco
All under .NET 7.0 Given is a custom library isential.crypt.dll that contains no external dependencies. A NuGet package was created from it and stored in a local package source. A second custom library named isential.MySqloverSsh.dll uses three...
16 Aug 2023 by temuco
I noticed that there is a difference between the version of a NuGet package and the version of the assembly it contains. Previously, I had set the assembly version to "1.0.*", which meant that it was automatically incremented with each build....
14 Jul 2023 by Member 16050394
I have updated jackson dependency version in my maven project from 2.7.4 to 2.15.0 due to vulnerabilities in older versions. After updating I am getting an exception NoClassDefFoundError. I tried to use jackson BOM 2.15.0 but still getting that...
15 Jun 2023 by Member 13992703
I'm currently struggling with the following issue: I need to use an interface in my plugin (PLUGIN A) that comes from another plugin (PLUGIN B). I'm also the developer on PLUGIN B so I can make code changes (if needed). What I've done so far: ...
13 Mar 2023 by Masis Levin
Redis with .NET | Redis Documentation Center[^]
8 Mar 2023 by Khushboo Dewani
what is the code for add data in redis database using hash datatype of redis in C# asp.net core 3.1?Also what is the concept of master key in it? I have to analyse the code for add in api and rewrite the code for add so that my data should be...
8 Jan 2023 by reverser69
hi all i have a target app written in Java. i want to call one of its functions. im using Intellij Idea. i imported its dependencies. wrote a few lines of code and till now, i have two problems. 1. i get: Exception in thread "main"...
8 Jan 2023 by Richard MacCutchan
1. See the discussion at https://stackoverflow.com/questions/34855649/invalid-signature-file-digest-for-manifest-main-attributes-exception-while-tryin[^]. 2. The log4j library is not part of a the standard Java libraries, so you need to include...
14 Jul 2021 by Member 14192879
I want to create a pdf of the current xamarin form. I used pdf sharp and itext7 to implement it but unable to do it. but below code only capture the text of xamarin, not the image. i just want to save currently viewed xamarin form to pdf. I am...
10 May 2021 by Member 15076657
I'm trying to run an .exe. When it runs, it shows the following error. Error occurred during initialization of VM Unable to load native library: Can't find dependent libraries What does this mean? JNIEnv* create_vm(JavaVM** jvm) { //JavaVM*...
10 May 2021 by Richard MacCutchan
OK, I have a working version, which required a couple of minor changes: #include JNIEnv* create_vm(JavaVM** jvm) { //JavaVM* jvm; /* denotes a Java VM */ JNIEnv* env; /* pointer to native method interface */ JavaVMInitArgs...
9 May 2021 by OriginalGriff
If you don't understand an error message, Google it: Error occurred during initialization of VM Unable to load native library: Can't find dependent libraries - Google Search[^] What it means is that a DLL is missing, or incompatible with the...
26 Oct 2020 by Matteo Prosperi
Being an engineer on the AWS SDK for .NET team, I tasked myself with figuring out how to use our libraries under Blazor in the browser.
28 Apr 2020 by Chinmaya C
Explanation about DIP and its need in the real time scenario
21 Apr 2020 by Richard Deeming
That runtime language pack can be downloaded from: Download .NET Framework 4.7.2 - PTB Language Pack[^] There's a list of available language packs under "Advanced downloads" on this page: Download .NET Framework 4.7.2 | Free official downloads[^]
21 Apr 2020 by Vikash Vyas
I had converted the WPF installer to the English to Portuguese (Brazil) also set the prerequisite. While I build the setup project it gives an error related to the Microsoft framework and 'Visual C++ "14" Runtime Libraries (x64)' ERROR: To...
26 Feb 2019 by L. Michael
This article provides a recipe on how to avoid producing legacy code at the speed of typing by using a proper architecture and unit testing.
8 Dec 2018 by Sharp Ninja
Simple Dependency Injection, the customizable way. Learn about the SimpleDI framework for creating simple and effective dependency injection.
9 Nov 2018 by dada2010
Hello everybody i have problems with some code : I try to cache some value from a config file in the global.asax, with a timer. The global goal of the project is to check some data and push messages for all webusers (via SignalR) every 20s. i add dependency on a file, but when updating this...
19 Sep 2018 by sai sruthi
Hi, I have a doubt. I have a singleton object of an interface defined in the Autofac container. I use this object across my solution. I need to access the interface inside custom authorize attribute and I need to resolve the dependency. What I have tried: I have tried sending it through...
7 Jul 2018 by hiimda95
I have problem when I build project WindowsForm application Dependency Injection. Here this is my code in Program.cs file. var builder = new ContainerBuilder(); builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly()); // Register your Web API controllers....
7 Jul 2018 by hiimda95
I fixed that. I made a mistake when I create UnitOfWork file. constructor of it must be create public.
6 Mar 2018 by Tisham Ahuja
Below is the code in app.module.ts file import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { HomeComponent } from './HomePage/home.component';...
19 Feb 2018 by syed shanu
How to use Dependency Injection in ASP.NET Core 2.0 and use the result to bind in our View page
22 Nov 2017 by Graeme_Grant
This is an alternative for "Simplest WPF Dependency Property For Beginners On Background Color"
30 Jul 2017 by HoangMinh Nguyen
This is an alternative for "SOLID architecture principles using simple C# examples"
6 May 2017 by Habibur Rony
This topic will cover the concept of the adapter pattern & how to implement logger using log4net. It will also cover what’s adapter pattern, why need, where & when to use; what’s Log4Net, implementation of logger using adapter pattern, how to implement and add custom SMTP appender & configuration.
5 May 2017 by Habibur Rony
This will cover how to use Domain Driven Design in your application according to the Onion Architecture. There are short descriptions about architecture Category / Style, N-Layer / N-Tier Architecture, Template Method Pattern and Facade Design Pattern.
24 Apr 2017 by Habibur Rony
This topic will cover the bad design practice using STUPID and good design practice using SOLID. Detailed explanation for Single Single Responsibility Principle, Open and Closed Principle, Liskov Substitution Principle, Interface Segregation Principle and Dependency Inversion (DI) Principle.
17 Apr 2017 by Gary Harpaz
Dependency injection frameworks are bad practice. So how can we still use dependency injection? Just do it yourself!
8 Feb 2017 by Rasik Bihari Tiwari
Let's understand exactly what is Dependency Inversion principle and what it is not. How people confuse it to be dependency injection which is it NOT.
28 Dec 2016 by Fiyaz Hasan
Learn how dependency injection mechanism has evolved from ASP.NET to ASP.NET Core
25 Nov 2016 by SubodhWasankar
How to use dependency injection in ASP .NET MVC N-Layer Architecture?
15 Nov 2016 by shikhar gilhotra
Hi friends, Can we use abstract class in Dependency injection instead of an Interface. please give answer if u have implemented it. no fake replies please. ?What I have tried:i tried adding an abstract class but ut does not work.
12 Nov 2016 by Zebedee Mason
Perform dependency analysis by using Doxygen to parse source code and produce a report
23 Oct 2016 by Matthew So (Hong Kong)
A task processing server with RDLC Implementation and extensible to customized handlers
13 Oct 2016 by MaDOnos
Adapter implemantation to mock DbContext easily
22 Sep 2016 by Alexandros Pappas
This project provides utilities for SQL server, such as executing a list of SQL scripts, exporting data to an SQL script, and displaying relationships between records.
10 Aug 2016 by Aless Alessio
Design your solution and code your classes as loosely-coupled objects. Learn how to use MOQ and Ninject for mocking your Service and injecting it at runtime with Ninject.
29 Jul 2016 by Hein Pauwelyn
This is an application made for Windows (Universal) 10 devices made with MVVM, IoC-containers and dependency injection. There is also an API from Yahoo and SQLite service.
7 Jul 2016 by Zebedee Mason
Software for automatically constructing architecture diagrams and metrics from source code and .NET assemblies is presented. Examples for Visual C++, Python, the Linux kernel, Boost and .NET are discussed.
7 Jun 2016 by GProssliner
cobj is a preprocessor based generator for interface based polymorphism
9 May 2016 by xszaboj
Dependecy injection with ninja
11 Mar 2016 by Anil Ghildiyal
Hello all, I am using sql dependency to get notifications from sql server, also using signalR for sending notifications to all active clients. I have already achieved the results as expected but now I need to use a complex select query instead of a simple statement.What I have...
4 Mar 2016 by Sergey Alexandrovich Kryukov
First of all, you have not two injecting dependencies, but three. The answer is: not only two dependencies are not tightly coupled, but there is no coupling issue at all. You probably think that two instances are coupled via common IAccountInfo, but… there is nothing like that. You have,...
4 Mar 2016 by zhshqzyc
I have a class which use dependency injection.public class BoerpiDebitAccountBalanceRetriever : IDebitAccountBalanceRetriever { private readonly IAccountInfo _MyDebitAccountInfo; public Exception ServiceException { get; set; } public...
29 Feb 2016 by mayooran99
I have a library project which is built in maven. It has its dependencies. I need to export this project as a jar (Not a runnable jar). Should I include the dependencies along with my jar or should I not? Because when I exported the dependencies with my jar, there were conflicts when the same...
28 Dec 2015 by Purbasha Ghosh
Initialize MVC controllers with multiple instance resolutions of same interface
14 Dec 2015 by Ciumac Sergiu
A simple way of using dependency injection and service locator in you class library
3 Dec 2015 by Gaurav K Rastogi
This is the article which basically is the comparison between three most popular DIs in .NET.
1 Dec 2015 by E.F. Nijboer
You need to drain the output streams to prevent hanging. Check the links for some detailed info. http://www.rgagnon.com/javadetails/java-0014.html[^]http://steveliles.github.io/invoking_processes_from_java.html[^]Good luck!
1 Dec 2015 by Chris Copeland
Hi all,I'm trying to enable command-line processing within a Java application to automate certain events whenever command-line arguments as passed into the application.There are two applications which are executing, management and reports. The idea is to allow the management software to...
17 Nov 2015 by Emmanuel Nuyttens
Example of a multi purpose Layered framework for simplifying modern .NET application development
9 Nov 2015 by Oetawan
Extend ASP.NET MVC behavior to auto wire controller dependency
15 Sep 2015 by Richard MacCutchan
Please read Code Project Quick Answers FAQ[^].
15 Sep 2015 by Alex(Lei) Chi
Guys, I am looking for a service deploy tool with scheduler configuration and dependency for a while.I remember it should be WIX(Windows Installer Xml) - four years ago memory.it should support:Remoting deployment managementSchedule TaskService dependency configurationactually,...
25 Aug 2015 by K. Naveen. Bhat
The article shows how we can solve various technical problems easily with the help of delegates.
12 Jun 2015 by Charaf Dadoua
SQL dependency with C#.NET and SQL Server 2012
11 Jun 2015 by Lance Contreras
Create an easily resusable IconBlock (TextBlock that display's an icon)
10 May 2015 by Sergey Alexandrovich Kryukov
Please see my comment to the question. As your post does not make a real question, there is nothing to answer to.However, I can give you a couple of hints. First, did you pay attention that you Content class is non-generic? Why? Secondly, here is how the derived classes are...
10 May 2015 by AhmedYehiaK
I ask about if i can do something like that://In classlib1.dllclass Context : IdentityDbContext { .............}//In classlib2.dllclass MyUser : IdentityUser{ extend IdentityUser.......}Dependency injection registration:=> When you find...
2 Apr 2015 by Sascha Lefèvre
You can't. And you shouldn't, even if it was possible. It makes no sense - why would you want to do that? If M1 and M2 are specific to B and M3 specific to C, then implement M1 and M2 in B and M3 in C.It would violate the principle of polymorphism[^]: A subclass should behave like the...
2 Apr 2015 by 9000605667
I have a class A with 3 methods M1,M2,M3.Class B is inherited from Class A & Class C is inherited from Class B.Now all the methods in Class A are accessible for Class B & Class C.Now i want to restrict 1)M1 & M2 of Class A for Class B2)M3 for Class C .How can i do this.
21 Mar 2015 by Priyank Modi
In Depth Look: Strategy Design Pattern, Dependency Injection (DI), Open/Closed principle (OCP) and Loose Coupling vs Tight Coupling
1 Mar 2015 by Bankey Sharma
Some general guidelines to make application source agnostic and business adaptive
23 Feb 2015 by Veronica S. Zotali
How to use TypedFactoryFacility using Castle.Windsor
22 Feb 2015 by Supradeep Choudhury
Hi friends...Thanks for visit...I am facing a problem [due to lack of knowledge] in Visual Studio 2013. My project is under development. I have to create a dependency graph which I generated in VS2013 and saved. Now day by day new classes are created by developers and attached with project....
14 Jan 2015 by Pheonyx
Hi Guys,This may be a silly question, but I've been trying to improve my knowledge on Dependency Injection and am re-working an existing (fairly simple) project to utilise my new knowledge.However, I have the following question and I'm not certain what the correct approach is.I have...
27 Oct 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Of course, as the name suggests, it is the upcoming version of ASP.NET.
20 Oct 2014 by Nathan Minier
The primary issue with your code sample is the calling of the MainForm from your Main thread. After dusting off my constructor injection knowledge (I don't use it terribly much) it looks like you do have a good constructor injection model in place. if (Settings.GlobalSettings.LoginSuccess...
17 Oct 2014 by srilekhamenon
How to inject a my dataclass in winform using dependency injection my code isin my program.cs [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ...
21 Aug 2014 by Manoj Kumar Choubey
Dear all I would like to make application with the combination of web api controllers and mvc controllers both I installed following nuget packages1. unity.mvc43. unity.webapi4. webapiand I want to impliment dependency injection but I am having problem with dependency...
6 Aug 2014 by DannyVarod
Fast, stable and powerful creation of NuGet packages
8 May 2014 by Halil ibrahim Kalkan
An implementation of dependency injection, repository and unit of work patterns using Castle Windsor and NHibernate.
15 Apr 2014 by VishalKadiwala
Hi,I am creating a WCF service from scratch.I am using this WCF service to hold my all business logic and data access logic.If any one can help me to understand that what is the best practice or a best template to use for the same. I have heard about EF, UnitOfWork, Repository Pattern...
19 Mar 2014 by Sergey Alexandrovich Kryukov
Please see my comment to your "Solution 1". This is not a solution at all. Actually, referencing the types defined in the same project is not a problem at all. It is not easy, it is very easy. To start, start adding the xmlns attribute to your top XAML element by typing "xmlns:". The...
19 Mar 2014 by Justin Shepertycki
Finally found the culprit!!At my work, our desktops are hosted on a network share. I had brought two applications I was working on from home and dropped the application files temporarily on the desktop to make some quick minor changes. Turns out there is a bug in the WPF Designer where the...
19 Mar 2014 by Justin Shepertycki
I know this question has been asked multiple times, and I've gone through them all. Hopefully I didn't just miss something in the previous answers, but I'm stumped.My application was working fine yesterday, but today I booted it up and now none of my file references, including ViewModels or...
28 Feb 2014 by Aditya Magotra
Hi Maciej,I implemented it in below fashion. Can you please let me know whether i implemented properly :Register Windsor Container in Global.asax :- -----------------------------------------------------private static WindsorContainer _container = null; /// ...
27 Feb 2014 by Maciej Los
Have a look here: Castle Windsor Tutorial in Asp.Net MVC[^]
27 Feb 2014 by Aditya Magotra
Hi,Can anybody please let me know how to register interface using Castle.Winsdor in Application_Start Event of Global.asax & then how to access the registered interface on the web.page.If there is another appropriate approach please let me know.Any help will be highly...
7 Feb 2014 by Pranay Rana
What is dependency injection and why there is need of this software design pattern.
27 Jan 2014 by Shivprasad koirala
In this article we will try to understand SOLID Architecture principles using simple C# examples.
23 Jan 2014 by Christian Graus
By writing code, and designing things so that they are modular. That means creating a framework that accepts plugins that impliment a base class, and extending that base class to create plug ins.
23 Jan 2014 by javad_r_85
i want create modular application in asp mvc 4 like joomla cms and i want use area for moduls and create new solution for Each moduls where each moduls is 3layer (service layer- domin classe - Model) . I user Code first.how implement it?
15 Jan 2014 by Pete O'Hanlon
What you are talking about is software versioning, and it's part of a very big topic - release management. Whole books can be written about this area.So, the big question is, are there any simplistic ways of achieving this? The answer is yes, but it requires you to put quite a bit of...
15 Jan 2014 by Sander Rossel
Hi all,I have a question about how to handle database dependencies in 'generic' dll's.For example, I have written a dll that logs exception information to a database. We want to use this functionality for multiple customers.Now let's assume I have used this functionality for customer A...
13 Jan 2014 by Jeremy Likness
Learn how to perform interception of services using Angular's decorator feature.
14 Dec 2013 by BillWoodruff
If you are going to extend a Class to use another instance of another interface, then ... yes ... you will need to change the Class: if you didn't how would the Class ever "know" about, or be able to use, the added interface ?However an option would be extend some larger-scope entity that...
14 Dec 2013 by Andreas Gieriet
What is your expectation on DI?DI does not magically extend functionality.DI allows to pass dependencies explicitly from outside instead of implicitly instanciating the dependencies.If you add in your Samurai class some new dependency, you have to provide means to pass them (DI) to the...
14 Dec 2013 by HarisJayadev
Hi Friends, Hope all doing well. I'm new to dependency injection. i got a doubt while reading about Ninject. In Ninject wiki i saw an basic example for Dependency Injection. From that my doubt arises.This is the link....
23 Oct 2013 by Vinodh.B
hiI suggest you to use a delegate in cs page which will be listening to the usercontrol events .
23 Oct 2013 by Ali_100
I need some opinion, if I am using user control & aspx page, & i have the requirement to use aspx page's label depend on some condition of usercontrol.but page_load event of aspx page is fired first , then user control's page_load event fired, so how do you able to update the label of aspx...
3 Oct 2013 by kpkaran88
I created windows service using C# I want to do some process depending the table valuesSo i used sql notification to do the process.With reference of this linkhttp://msdn.microsoft.com/en-us/library/a52dhwx7%28v=vs.80%29.aspxIf we didn't use the service long time it will go to...