# Goal The goal of this project is to help, fill the gap of supporting multiple ORM's in DynamicQuery, and possibly more projects in the future. One of the most obvious reason is to be able to execute async/await operations on the context without, the executing library to be dependant on the ORM Framework such as (EF Core, EF6). ## Getting Started > Install nuget package to your awesome project. 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 | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.Data.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.Data/) | ```PM> Install-Package PoweredSoft.Data``` PoweredSoft.Data.EntityFramework | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.Data.EntityFramework.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.Data.EntityFramework/) | ```PM> Install-Package PoweredSoft.Data.EntityFramework``` 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``` PoweredSoft.Data.MongoDB | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.Data.MongoDB.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.Data.MongoDB/) | ```PM> Install-Package PoweredSoft.Data.MongoDB``` # In your application you may do the following ```csharp public class Startup { public void ConfigureServices(IServiceCollection services) { // for mongo. services.AddPoweredSoftMongoDBDataServices(); // for ef core services.AddPoweredSoftEntityFrameworkCoreDataServices(); } } ``` ## AsyncQueryableService Also as the same kind of goal, will slowly add support for a non dependant to orm/drivers async method. ```csharp public interface IAsyncQueryableHandlerService { Task FirstOrDefaultAsync(IQueryable queryable, CancellationToken cancellationToken = default(CancellationToken)); Task FirstOrDefaultAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default(CancellationToken)); Task> ToListAsync(IQueryable queryable, CancellationToken cancellationToken = default(CancellationToken)); Task CountAsync(IQueryable queryable, CancellationToken cancellationToken = default(CancellationToken)); Task LongCountAsync(IQueryable queryable, CancellationToken cancellationToken = default(CancellationToken)); Task AnyAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default(CancellationToken)); Task AnyAsync(IQueryable queryable, CancellationToken cancellationToken = default(CancellationToken)); bool CanHandle(IQueryable queryable); } ``` How to use ```csharp public class SomeClass { private readonly IAsyncQueryableService asyncQueryableService; public SomeClass(IAsyncQueryableService asyncQueryableService) { this.asyncQueryableService = asyncQueryableService; } public async Task GetFirstAsync(IQueryable query) { return await this.asyncQueryableService.FirstOrDefaultAsync(query); } } ```