Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Like Entity Framework Core's DbContext except it is ORM-less and uses ADO.NET in .NET Core

Notifications You must be signed in to change notification settings

Afulton11/ADO.NET-ORMLess-Data-Access

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADO.NET-ORM-Less-Database

A ORM-Less library based off of EF Core's DbContext. Made for use in an ASP.NET Core application, but could be used in any .Net Core application.

Utilizing .Net Core's Dependency Injection

        public void ConfigureServices(IServiceCollection services)
        {
            ...
            
            // Create a SQLiteDatabase that can be injected into any constructor with a type parameter of 'SQLiteDatabase'.
            services.AddDatabase<SQLiteDatabase>((provider, options) =>
            {
                options.UseSqliteDataSource("some/path/to/sqlite.db");
            });
            
             // Create 'SomeDatabase' that can be injected into any constructor with a type parameter of 'ISomeContract'.
            services.AddDatabase<ISomeContract, SomeDatabase>((provider, options) =>
            {
                options.UseConnectionString("some/connection/string");
            });
            ...
        }

While there is a built in SQLiteDatabase and SQLDatabase You may extend those or create a new custom Database altogether by extending Database

About

Like Entity Framework Core's DbContext except it is ORM-less and uses ADO.NET in .NET Core

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages