Giter Site home page Giter Site logo

mikarsoft / blackhole-core-orm Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 28.55 MB

The Fastest, Easiest and Most Complete ORM for .NET Core.

Home Page: https://mikarsoft.com

License: MIT License

C# 100.00%
automatic dapper dotnet dotnet-core dotnet6 dotnetcore easy easy-to-use ef-core efcore

blackhole-core-orm's Introduction

A very Fast, Fully automated and easy to setup ORM that has ALL the required features:

  • Supports out of the box: SQL Server, MySql, Postgres, Oracle and SqLite.
  • Handling all the databases with the same methods.
  • Auto Create and Update Database on Startup.
  • Tables are based on the Entities.
  • Supports Autoincrement, Composite Primary Keys.
  • Has Value Generator Interface , to auto generate values on Insert.
  • Uses Property Attributes to declare, Foreign Keys , Unique constraints and more.
  • Direct Mapping Entities to DTO.
  • Methods for performing Joins on any table.
  • Interface for Default Data.
  • Using BlackHole.Core.Cli it can Parse Any Database and Generate the Entities in the app.

Find documentation here => BlackHole Documentation

Find Example Project here => BlackHole Example

Find YouTube Tutorials here => Mikarsoft YouTube

Find Nuget Package Here => versions (6.1.2 / 7.1.2 / 8.1.0-rc2)

Changes: v6.1.2 / v7.1.2 / v8.1.0-rc2 Singularity Edition

  • Bugfix Postgres adding Not Nullable Column
  • Mandatory logging on Database Update
  • Added Parsing for Default Values
  • Minor optimization on Joins

Quick Start:

  • In Your project install Black.Hole.ORM from Nuget.org

  • In your Program.cs add (Namespace => using BlackHole.Configuration) Add the following line into your IServiceCollection => services.SuperNova(settings => settings.AutomaticUpdate().AddDatabase(connection => connection.UseSqlServer(connectionString)))

  • Create some Entities in any folder that Inherit from the class 'BlackHoleEntity' for Entities that are using Integer as Id, or 'BlackHoleEntity' for Entities that are using Guid as Id or 'BlackHoleEntity' for Entities that are using SHA1 hash as Id. (Namespace => using BlackHole.Entities)

  • There is also the 'BHOpenEntity' Interface which is a more flexible and advanced Entity, with more capabilities, but slightly less performance. It is suggested to advanced Developers that want to have full control of the Entity, using Composite Keys , Autogenerated values and more..

  • Add properties on your Entities except the Id property that already exists in the BlackHoleEntity class.

  • Add Attributes to the properties of your Entities' '[ForeignKey(typeof(Entity), nullability)]' , '[NotNullable]', [Unique(int)] and '[VarCharSize(int)]'

  • You can also use '[UseActivator]' Attribute on your BlackHoleEntity, to take advantage of the 'IsActive' column in case you need to keep the data after delete. (Namespace => using BlackHole.Entities)
  • Make your services Inherit from 'BlackHoleScoped' or 'BlackHoleSingleton' or 'BlackHoleTransient' so they will be automatically registered on the Startup to the IServiceCollection. (Namespace => using BlackHole.Services)

  • Last step , go to your services or your controllers and add the Interfaces for the DataProviders => private readonly IBHDataProvider<Entity,IdType> _entityService; private readonly IBHOpenDataProvider _openEntityService; Example: IBHDataProvider<Customer,Guid> _customerService; (Namespace => using BlackHole.Core)

  • Done! You are ready to use all the functionality of the Data Providers in your services.

  • Data Providers contain all the required methods to communicate with the database.

Visit Mikarsoft Official Webpage for more Information.

blackhole-core-orm's People

Contributors

mikarsoft avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.