Browse Source

Resolved #514

pull/533/head
Yunus Emre Kalkan 8 years ago
parent
commit
970f09e0e6
  1. 8
      docs/Dependency-Injection.md
  2. 8
      docs/Index.md
  3. 2
      docs/Module-Development-Basics.md

8
docs/Dependency-Injection.md

@ -1,10 +1,10 @@
## Dependency Injection ## Dependency Injection
ABP's Dependency Injection system is developed based on Microsoft's <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection" target="_blank">dependency injection extension</a> library (Microsoft.Extensions.DependencyInjection nuget package). So, it's documentation is valid in ABP too. ABP's Dependency Injection system is developed based on Microsoft's [dependency injection extension](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection) library (Microsoft.Extensions.DependencyInjection nuget package). So, it's documentation is valid in ABP too.
### Modularity ### Modularity
Since ABP is a modular framework, every module defines it's own services and registers via dependency injection in it's own seperate <a href="Module-Development-Basics.md" target="_blank">module class</a>. Example: Since ABP is a modular framework, every module defines it's own services and registers via dependency injection in it's own seperate [module class](Module-Development-Basics.md). Example:
````C# ````C#
public class BlogModule : AbpModule public class BlogModule : AbpModule
@ -146,7 +146,7 @@ public class TaxCalculator : ITaxCalculator, ITransientDependency
#### Manually Registering #### Manually Registering
In some cases, you may need to register a service to the `IServiceCollection` manually, especially if you need to use custom factory methods or singleton instances. In that case, you can directly add services just as <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection" target="_blank">Microsoft documentation</a> describes. Example: In some cases, you may need to register a service to the `IServiceCollection` manually, especially if you need to use custom factory methods or singleton instances. In that case, you can directly add services just as [Microsoft documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection) describes. Example:
````C# ````C#
public class BlogModule : AbpModule public class BlogModule : AbpModule
@ -193,7 +193,7 @@ Constructor injection is preffered way of injecting dependencies to a class. In
#### Property Injection #### Property Injection
Property injection is not supported by Microsoft Dependency Injection library. However, ABP can integrate with 3rd-party DI providers (<a href="https://autofac.org/" target="_blank">Autofac</a>, for example) to make property injection possible. Example: Property injection is not supported by Microsoft Dependency Injection library. However, ABP can integrate with 3rd-party DI providers ([Autofac](https://autofac.org/), for example) to make property injection possible. Example:
````C# ````C#
public class MyService : ITransientDependency public class MyService : ITransientDependency

8
docs/Index.md

@ -6,13 +6,13 @@
* From Startup Templates * From Startup Templates
* [ASP.NET Core MVC Template](Getting-Started-AspNetCore-MVC-Template.md) * [ASP.NET Core MVC Template](Getting-Started-AspNetCore-MVC-Template.md)
* From Empty Projects * From Empty Projects
* <a href="Getting-Started-Console-Application.md" target="_blank">With Console Application</a> * [With Console Application][Getting-Started-Console-Application.md]
* <a href="Getting-Started-AspNetCore-Application.md" target="_blank">With ASP.NET Core Web Application</a> * [With ASP.NET Core Web Application][Getting-Started-AspNetCore-Application.md]
* Tutorials * Tutorials
* Application Development * Application Development
* [With ASP.NET Core MVC](Tutorials/AspNetCore-Mvc/Part-I.md) * [With ASP.NET Core MVC](Tutorials/AspNetCore-Mvc/Part-I.md)
* Fundamentals * Fundamentals
* <a href="Dependency-Injection.md" target="_blank">Dependency Injection</a> * [Dependency Injection](Dependency-Injection.md)
* AutoFac Integration * AutoFac Integration
* [Virtual File System](Virtual-File-System.md) * [Virtual File System](Virtual-File-System.md)
* [Localization](Localization.md) * [Localization](Localization.md)
@ -37,7 +37,7 @@
* Timing * Timing
* [Multi Tenancy](Multi-Tenancy.md) * [Multi Tenancy](Multi-Tenancy.md)
* Module Development * Module Development
* <a href="Module-Development-Basics.md" target="_blank">Basics</a> * [Basics](Module-Development-Basics.md)
* Plug-In Modules * Plug-In Modules
* [Best Practices](Best-Practices/Index.md) * [Best Practices](Best-Practices/Index.md)
* Domain Driven Design * Domain Driven Design

2
docs/Module-Development-Basics.md

@ -32,7 +32,7 @@ public class BlogModule : AbpModule
} }
```` ````
You can register dependencies one by one as stated in Microsoft's <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection" target="_blank">documentation</a>. But ABP has a **conventional dependency registration system** which automatically register all services in your assembly. See the [dependency Injection](Dependency-Injection.md) documentation for more about the dependency injection system. You can register dependencies one by one as stated in Microsoft's [documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection). But ABP has a **conventional dependency registration system** which automatically register all services in your assembly. See the [dependency Injection](Dependency-Injection.md) documentation for more about the dependency injection system.
You can also configure other services and modules in this way. Example: You can also configure other services and modules in this way. Example:

Loading…
Cancel
Save