Navigation: <Root level>

Getting Started






Installing from Nuget


You should install DbNetSuiteCore with NuGet


Install-Package DbNetSuiteCore


Or via the .NET Core command line interface:


dotnet add package DbNetSuiteCore



Adding DbNetSuiteCore to your application


Update the program.cs file in your web application as follows


using DbNetLink.Middleware;             // <= Add this line


var builder = WebApplication.CreateBuilder(args);


// Add services to the container.


builder.Services.AddDbNetSuiteCore();   // <= Add this line


var app = builder.Build();




app.UseDbNetSuiteCore();                // <= Add this line









A simple Razor view


Now add the component to your Razor view




    Layout = null;


@using DbNetSuiteCore.Components;

<!DOCTYPE html>

<html lang="en">


    <meta charset="utf-8" />



    // Styles required by DbNetGridCore







    // Configure the grid and render

    DbNetGridCore customersGrid = new DbNetGridCore(







    // Client-script required by DbNetGridCore







@DbNetSuiteCore.StyleSheet() adds the the styles used by the component to the page. If you are using the component on multiple pages you would typically include this in your layout page. The method takes 2 optional arguments of fontSize and fontFamily which allow the font size and font family to be changed for any grid that consumes the rendered stylesheet. e.g.





DbNetGridCore customersGrid = new DbNetGridCore( "northwind", "customers" );  configures the component, at it's simplest the configuration of the grid is to pass the name of the connection string (defined in your appsettings.json file) followed by the name of a table or view in the database to the constructor.

@customersGrid.Render() renders the grid and should be place at the point in the view where you want the grid to appear

@DbNetSuiteCore.ClientScript() adds the client-side script used by the component to the page. Like the styles if you are using the component on multiple pages you would typically include this in your layout page.




DbNetSuiteCore can be configured via the appsettings.json file by adding the following section


  "DbNetSuiteCore": {

    "FontSize": "small",

    "FontFamily": "Arial",

    "Debug" :  true,

    "ReadOnly" : false




The following properties can be configured


FontSize - Can be used to set the font size for all DbNetSuiteCore controls e.g. Small, Medium or Large

FontFamily - Can be used to set the font family for all DbNetSuiteCore controls e.g. Verdana, Arial, Tahoma etc

Debug - Set to true to put DbNetSuiteCore in Debug mode

ReadOnly - If set to true then any updates the the database are suppressed and a message returned to the user


Database Support


DbNetSuiteCore supports connection to the following databases:

MSSqlServer (default)





A control will make an attempt to automatically determine the type of database you are connecting to from the connection string but if this fails you can specify the DatabaseType explicitly either as a property or in the constructor. For connections to MS SQL Server and SQLite the Data Provider is included in the framework but for the following databases you will need to install the data provider from a Nuget package into your application:


PostgreSQL -

MariaDB -

JSON Support

In addition to direct database support DbNetGridCore and DbNetEditCore can be used with JSON based data sources delivered from external API's. The JSON can either be supplied in a raw format or as a List of objects that can be serialized to JSON.




Copyright © 2023 DbNetLink