Data dodania Pytanie
2018-02-13 18:02 How can I split up my service registations into different files in ASP.NET Core? »
If you've ever used Windsor Installers then you know what I'm talking about. You can have different installers for different parts of the application ...
(1) odpowiedzi
2018-02-09 13:02 .NET Core 2.0 Autofac Register Class InstancePerRequest doesn't work »
Here is my interface public interface IMatchServices { string MatchList(); } and class here public class MatchServices : IMatchServices { ...
(1) odpowiedzi
2018-02-06 12:02 WebApi Custom Filter with injected interface in constructor does not get called »
My problem statement is same as this question i.e., use an injected service in attribute/filter. I have tried the solution given by B Z and following ...
(1) odpowiedzi
2018-02-03 09:02 MVC API controller error with dependency injection »
i have a simple controller where i am using the interfaec like this , public class HomeController : Controller { // GET: Home private IHotelS...
(1) odpowiedzi
2018-01-20 12:01 Getting a Module Error in AngularJS when adding a controller to UI Router state »
App.js var myApp=angular.module('sampleApp', ['ui.router','MainCtrl', 'NerdCtrl', 'NerdService', 'GeekCtrl', 'GeekService','ngMaterial']); myApp.con...
(1) odpowiedzi
2018-01-17 10:01 Toothpick bind modules that depends on each other »
I am trying out the toothpick DI library and I seem to miss something crucial. I created the following test project on github where I tried to make a...
(1) odpowiedzi
2018-01-08 21:01 Middleware DI Error »
I am attempting to implement the API Key Validator mentioned in this post. I am running into an issue where the injected service I am using to do val...
(1) odpowiedzi
2018-01-07 18:01 In ASP.Core, what does "injecting IStartup directly into the dependency injection container rather than calling UseStartup or Configure" mean? »
In the ms docs Hosting in ASP.NET Core the last section states: If the host is built by injecting IStartup directly into the dependency injecti...
(0) odpowiedzi
2018-01-06 21:01 SignalR Dependency Injection for ASP.NET Core v2.0 using Autofac »
Is it possible to use dependency injection to inject dependencies into SignalR on ASP.NET Core v2.0? Assuming the following hub and dependency: publ...
(1) odpowiedzi
2018-01-03 23:01 Angular Dependency Injection - @Injectable() fails in test, while @Inject() works »
Generic issue I have just started adding webpacker with angular 5 to the existing rails application. All is fine except for a weird issue with a DI i...
(2) odpowiedzi
2017-12-29 05:12 How to get an instance of IConfiguration in asp.net core? »
I making a unittesting project to test my webapi and i need to initialize a controller the problem is that in the constructor it receive a IConfigurat...
(1) odpowiedzi
2017-12-27 19:12 What is the right way to implement classes as a component in .Net Core? »
I'm trying to implement some providers in my code. Now, providers can be different types. For example a provider can fetch a url, read some xml and pa...
(0) odpowiedzi
2017-12-26 16:12 Exception while using logger in background job (ASP.NET Core / Serilog) »
I'm having problems using the logger in the context of a fire-and-forget background job with ASP.NET Core WebApi. When using logger.LogInformation("so...
(1) odpowiedzi
2017-12-16 09:12 ASP.NET Core DI Constructor vs RequestServices »
Why is requesting services via HttpContext.RequestServices or IServiceProvider consider bad practise. I can read this statement all over the place: ...
(1) odpowiedzi
2017-12-07 00:12 PHP (Laravel) Dependency Injection Basics »
I have recently come across the SOLID design principles and have been looking to find ways to incorporate dependency injection into my work so that I ...
(1) odpowiedzi
2017-12-06 16:12 ASP.NET Core DI: Resolve same instance if scoped service is registered both as service type and implementation type »
Say I have a service that I want to resolve with a scoped lifetime. But sometime I try to resolve it as the interface type and sometimes at the implem...
(1) odpowiedzi
2017-12-03 22:12 Laravel 5.5 Resource Controller and Dependecy Injection »
I am working on a Laravel 5.5 application. When I use php artisan make:model SomeModel -mr it creates the model, migration and resource controller. I...
(3) odpowiedzi
2017-12-01 11:12 @EntityListeners Injection + jUnit Testing »
I use @EntityListeners to make operations before I save in my Db and after I load. Inside my Listener class I make a call to an Ecryptor (which needs ...
(0) odpowiedzi
2017-10-31 23:10 Netcore - Apply configurations to framework classes »
I have a set of libraries, which I want to move from PCL to netcore. With the move I want to streamline the DI system and update some internal working...
(1) odpowiedzi
2017-10-29 22:10 Using dependency injection in a Game of Life to inject new rules »
I have a course project that is a refactor of Game of Life in Scala. It's a simple pure Scala + SBT project. One of my tasks is to extract the game l...
(0) odpowiedzi
2017-10-29 05:10 constructor injection vs method injection »
Laravel encourages dependency injection. Since I am using laravel on my project, I figured I'll try using this approach. I am taking advantage of Lar...
(2) odpowiedzi
2017-10-25 04:10 ASP.NET Core 2.0 with Autofac, type not assignable to service »
I simply cannot figure this out. Using Autofac with .Net core 2.0 and trying to resolve some simple dependencies. Feel like I've tried everything so m...
(1) odpowiedzi
2017-10-13 00:10 Retrieve the claims using Simple Injector »
The project I am working on is storing data inside the claim that I need to retrieve. The project is using Simple Injector as its IoC container and I ...
(0) odpowiedzi
2017-10-11 20:10 ASP.NET Core 2.0 Dependency Injection default instance »
I'm using ASP.NET Core 2.0 and Microsoft.Extensions.DependencyInjection. I have a few class where I don't want to specified its implementation or I do...
(2) odpowiedzi
2017-10-08 16:10 mvc core 2.0, how to use an appSettings.json file via configuration »
Today I was trying out the new asp.net core 2.0 but ran into some trouble using a JSON configuration file that I wasnt to inject in IConfiguration co...
(2) odpowiedzi
2017-10-07 04:10 What are hidden dependencies? »
Could someone please give me an example of a hidden dependency. I've googled it, and found results like this: "A visible dependency is a dependen...
(2) odpowiedzi
2017-10-04 00:10 DbContext Dependency Injection outside of MVC project »
I have a C# solution with two projects, ProductStore.Web and ProductStore.Data, both targeting .NET Core 2.0. I have my HomeController and CustomerRe...
(3) odpowiedzi
2017-09-28 20:09 Dependency injection of multiple instances of same type in ASP.NET Core 2 »
In ASP.NET Core 2 Web Api, I want to use dependency injection to inject httpClientA instance of HttpClient to ControllerA, and an instance httpClientB...
(3) odpowiedzi
2017-09-22 02:09 What is causing a dependency injection failure in an AngularJS directive? »
I'm getting a dependency injection error with the code below. I'm not sure why, because rosterStateHelper works in other files, including the one I am...
(1) odpowiedzi
2017-09-22 00:09 Dependency Injection circular dependency .net core 2.0 »
I want my ApplicationContext constructor to have the UserManager as a parameter but having trouble with dependency injection. Code: public class App...
(1) odpowiedzi
2017-09-21 16:09 Autowiring properties in base classes not working in ASP.NET Core 2 »
I have a .Net Core 2 app and an API controller class which inherits from an abstract base class: [Route("api/[controller]")] public class MyControl...
(0) odpowiedzi
2017-09-19 10:09 How to Use LoggerFactory and Microsoft.Extensions.Logging for .NET Core Console Logging With C# »
I've created a console application that uses a service layer. Program.cs public static void Main(string[] args) { // Create service collection ...
(1) odpowiedzi
2017-09-17 23:09 Webapi Application Impelimenting Dependency injection »
I am learning to implement DI and Pattern in my application and I have created some requirements for myself Wrote a WebAPI application with a bunch of...
(0) odpowiedzi
2017-09-16 12:09 How to Inject() into a class with constructor parameters? »
I have a WebSocket controller which creates per connection actor handler: class WebSocketController @Inject()(cc: ControllerComponents)(implicit exc:...
(2) odpowiedzi
2017-09-15 12:09 Laravel: why a registered service provider is not called when instantiating its provided class? »
This is my service provider: <?php namespace App\Providers; use Illuminate\Support\Facades\Config; use Illuminate\Support\ServiceProvider; clas...
(1) odpowiedzi