diff --git a/README.md b/README.md index 407c1a5..688ad55 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,31 @@ One of the most obvious reasy is to be able to execute async/await operations on Full Version | NuGet | NuGet Install ------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------: PoweredSoft.Data.Core | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.Data.Core.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.Data.Core/) | ```PM> Install-Package PoweredSoft.Data.Core``` -PoweredSoft.Data.EntityFrameworkCore | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.Data.EntityFrameworkCore.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.Data.EntityFrameworkCore/) | ```PM> Install-Package PoweredSoft.Data.EntityFrameworkCore``` \ No newline at end of file +PoweredSoft.Data.EntityFrameworkCore | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.Data.EntityFrameworkCore.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.Data.EntityFrameworkCore/) | ```PM> Install-Package PoweredSoft.Data.EntityFrameworkCore``` + + +# In your application you may do the following + +```csharp +public class Startup +{ + public void ConfigureServices(IServiceCollection services) + { + services.AddPoweredSoftDataServices(); + } +} +``` + +> Then somewhere else. + +```csharp +public class SomeClass +{ + private readonly IDbContextFactory contextFactory; + public SomeClass(IDbContextFactoryProvider dbContextFactoryProvider) + { + contextFactory = dbContextFactoryProvider.GetContextFactory(typeof(YourFavoriteContext)); + } +} + +``` \ No newline at end of file