- Introduction
- Goal
- Features
- Prerequisites
- Creating a new qBic Project
- Documentation
- Sample Code
- Known Problems
8.1 SQLite.Interop.dll
8.2 Unable to delete SQLite dll - Projects using qBic
A platform for creating Web Servers, back-end solutions, CRM or CMS systems in .Net 5
qBic is powered by code-driven configuration. The entire application is built using C# code.
The easiest way to demonstrate what qBic offers, is by showing an example.
With qBic, you can create admin portals, dashboards, CMS sites, identity servers, and much more.
All of this while only writing .Net code.
No HTML, JavaScript or CSS.
A lot of the magic is driven by abstract classes and inheritance.
The goal of this framework/platform is to never have to worry about the front-end, web, code.
I wasn't very good with JavaScript or HTML when I started this project, and I disliked having to write and debug code in the browser when all I wanted to do was work on the back-end C# code.
So I created this Framework so I didn't have to repeat the same work over and over again.
Not only did I make this framework create the UI for me, but it also adds a number of commonly used features.
One of my main goals was to allow a single developer to build a relatively large and complex system.
And I believe qBic has achieved that.
Any qBic Application will get all of the following features out of the box, without having to write any extra code:
- Database synchronization, using NHibernate
- Auditing
- User repository
- Authentication and Authorization
- Email based account confirmation
- Email based password reset functionality
- Role based access control
- Customizable menu system
Before using and running qBic, the following should be installed or adhered to:
- You have .net 5 installed on your development machine.
- You run Visual Studio as an administrator when working on qBic projects.
To create and run a new project, simply run the following commands:
- dotnet new install qbic-dotnet-template
- dotnet new qBic -n myProject
- cd myProject
- dotnet run
- Visit https://localhost:5001
- It might take a few seconds before the website is ready, so maybe refresh the web page
- Login with admin/password
Or, if on Windows, run the following single line:
dotnet new install qbic-dotnet-template && dotnet new qBic -n myProject && cd myProject && start "" "https://localhost:5001" && dotnet run
Documentation will be added over the course of time.
But, for the time being, there is a qBic Samples repository with examples of using the qBic platform.
Consider the following code.
This is all the code required to create basic CRUD functionality for a Category class, including the view and input screens and all the logic to actually view, create, edit and delete a category.
public class CategoryCrudItem : BasicCrudMenuItem<Category>
{
public CategoryCrudItem()
{
}
public override bool AllowInMenu => true;
public override string GetBaseItemName()
{
return "Category";
}
public override EventNumber GetBaseMenuId()
{
return 6530; // An internal number to uniquely identify this activity/event
}
public override Dictionary<string, string> GetColumnsToShowInView()
{
var res = new Dictionary<string, string>();
res.Add("Name", "Name");
res.Add("Description", "Description");
return res;
}
public override Dictionary<string, string> GetInputProperties()
{
var res = new Dictionary<string, string>();
res.Add("Name", "Name");
res.Add("Description", "Description");
return res;
}
}
And below is the view and the input screen this code generates:
Sometimes you might see this error when you try and run your qBic application while using SQLite
Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found
There are many reasons for seeing this error and we have made many efforts to fix them, but some reasons still persist:
-
The Identity of the AppPool in IIS that runs the qBic website does not have access to the location the project was created in.
This might be happen if the AppPool is DefaultAppPool and the Identity is NetworkService and the project is created inside the C:\Users\XXXX\source\repos folder which are the defaults for Visual Studio and IIS.
The easiest fix for this is to create or move the project into a different location (e.g. c:\MyProjects).
Another solution might be to change the Identity of the appPool, or give it access to the source\repos folder. -
On Raspberry pi, and possibly other linux distributions, the SQLite binaries need to be compiled and some of the output copied into the root folder to be able to use SQLite.
The exact folder to copy the files into will depend on where the dotnet run command is executed from.
Instructions for doing this can be found here: http://blog.wezeku.com/2016/10/09/using-system-data-sqlite-under-linux-and-mono/
When using SQLite (instead of MS-SQL) you might see an error when building your applicatio that the SQLite dll could not be removed.
As mentioned above, many steps have been taken to eliminate this error, but it might still ocurr from time to time.
The simplest solution for this has been to run the following command in an elevated command prompt:
iisreset
Some projects that have used, or are using, qBic are listed below.
Feel free to add your project too:
- The back-end for a custom mobile application for Bargain Books in South Africa
This has been discontinued - Repo Castle
A private NuGet repository with fine-grained access control - The qBic Samples application
This project shows example of features of qBic - A custom school CMS.
The system keeps track of studendts' attendance & grades, and also generate and prints report cards.