BlackHole.Core.ORM 7.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package BlackHole.Core.ORM --version 7.1.1
NuGet\Install-Package BlackHole.Core.ORM -Version 7.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlackHole.Core.ORM" Version="7.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlackHole.Core.ORM --version 7.1.1
#r "nuget: BlackHole.Core.ORM, 7.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BlackHole.Core.ORM as a Cake Addin
#addin nuget:?package=BlackHole.Core.ORM&version=7.1.1

// Install BlackHole.Core.ORM as a Cake Tool
#tool nuget:?package=BlackHole.Core.ORM&version=7.1.1

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 constrainst 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

Changes: v7.1.1 Singularity Edition

  • Maximum Performance and Memory Optimization
  • Added Database Protection on Failed Update. No changes are applied
  • User's Error detection and throw before the Update
  • No More Automatic update by default
  • Added AutomaticUpdate() Method in settings, to let the user decide when to use it
  • Added fully customizable BHOpenEntity
  • New Additional DataProvider for BHOpenEntity
  • Complete user Control of BHOpenEntity's properties
  • Support for Composite Primary Keys in BHOpenEntities, with or without autoincrement
  • Support for Composite Foreign Keys.
  • Value Generator Interface that Autogenerates a column's value on insert
  • Support For No PrimaryKey Table
  • New 'Unique' Attribute for creating Unique Column groups
  • Added Overload on 'ForeignKey' Attribute to point to specific column
  • Reading Automatically the DateFormat of the Database.
  • Improved faster Logging.
  • Upgraded Database Parsing. It can Parse any Database using the new BHOpenEntities
  • Added Initialization method that doesn't require Host. For Console and Desktop Apps
  • Added Option for using DoubleQuotes on SqLite and SqlServer Naming
  • BlackHoleEntities and BHOpenEntities can work together on Joins methods
  • Tracking and updating BHOpenEntity's values on the Insert methods

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<int>' for Entities that are using Integer as Id, or 'BlackHoleEntity<Guid>' for Entities that are using Guid as Id or 'BlackHoleEntity<string>' for Entities that are using SHA1 hash as Id. (Namespace ⇒ using BlackHole.Entities)

  • There is also the 'BHOpenEntity<Entity type>' 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<BHOpenEntity> _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.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.1.0-rc.2 184 10/31/2023
8.1.0-rc 45 9/26/2023
7.1.2 466 10/31/2023
7.1.1 328 9/26/2023
6.1.2 322 10/31/2023
6.1.1 322 9/26/2023
6.0.3 377 7/16/2023
6.0.2 382 7/8/2023
6.0.1 339 6/29/2023
6.0.0 391 4/20/2023

- Maximum Performance and Memory Optimization
- Added Database Protection on Failed Update. No changes are applied
- User's Error detection and throw before the Update
- No More Automatic update by default
- Added AutomaticUpdate() Method in settings, to let the user decide when to use it
- Added fully customizable BHOpenEntity
- New Additional DataProvider for BHOpenEntity
- Complete user Control of BHOpenEntity's properties
- Support for Composite Primary Keys in BHOpenEntities, with or without autoincrement
- Support for Composite Foreign Keys.
- Value Generator Interface that Autogenerates a column's value on insert
- Support For No PrimaryKey Table
- New 'Unique' Attribute for creating Unique Column groups
- Added Overload on 'ForeignKey' Attribute to point to specific column
- Reading Automatically the DateFormat of the Database.
- Improved faster Logging.
- Upgraded Database Parsing. It can Parse any Database using the new BHOpenEntities
- Added Initialization method that doesn't require Host. For Console and Desktop Apps
- Added Option for using DoubleQuotes on SqLite and SqlServer Naming
- BlackHoleEntities and BHOpenEntities can work together on Joins methods
- Tracking and updating BHOpenEntity's values on the Insert methods