.NET libraries

The Editor package includes a set of .NET libraries which you can make use of in your project using a simple reference to the DataTables.dll. These libraries provide everything needed for the client / server communication that the client-side DataTables and Editor Javascript libraries require. The features of these libraries include:

  • Create, Read, Update and Delete (CRUD) operations
  • Simple field definitions using a model (MVC pattern)
  • Field validation
  • Field formatters
  • Support for simple and complex joins
  • WebAPI and ASP.NET MVC support

This section of the Editor manual goes into detail about how to setup, configure and use the Editor .NET libraries.

Reference documentation is also available for Editor's .NET libraries, which document in detail the API interfaces and options of the classes and methods provided by the assembly.

.NET libraries manual

Installing

DataTables and Editor are powerful libraries, but before you can use them, they need to be installed on your system! This guide walks through how to download the C# Editor package and set it up. The end result will be the ability to run all of the Editor examples in your .NET environment. This installation is a simple four step process which this documentation below will quite you though. Read more »

Getting started

The .NET Editor libraries make it super quick for you to provide complex CRUD based web applications to end users. In order to achieve this we need to introduce the basic concepts of how the libraries operate and how you can use the interfaces that they provide to access your own databases. This page summarises how the Editor libraries operate and the concepts involved in using them. Read more »

Web API

ASP.NET Web API is a framework that was designed by Microsoft specifically to provide HTTP services that can be used with a wide range of clients. Its ability to easily define HTTP access routes and JSON handling makes it perfect for use with Editor. Read more »

ASP.NET MVC

ASP.NET MVC is a powerful framework that provides the ability to create complex dynamic web-sites. Its extensibility makes it easy to add DataTables and Editor to your toolbox, providing an even smoother experience for your users. Read more »

Validation

Validation of data is of fundamental importance in CRUD applications. You need to be sure that the data that the client is sending you is what you expect! This is not just for security reasons, protecting your data from misuse and intentional corruption, but also simply from unintentional mistakes in submitting data. Strings limited to a certain length, dates in a particular format and required fields are all common uses of data validation. Read more »

Formatters

Often the data that is stored in the database is not in a format that is suitable for display or manipulate by the end user. A common example of this is a timestamp - the number of nano-seconds since 1st January 1601 means very little to anyone, even extremely experienced developers, but it is a very useful format to hold the data in, since it can be sorted and filtered extremely quickly in the database. For this reason the Field class provides get and set formatters - specifically the GetFormatter and SetFormatter methods. Read more »

Joins

A cornerstone of CRUD applications is the ability to combine information from multiple SQL tables, representing the combined data as a common data set that the end user can easily understand and manipulate. Relational databases are, after all, designed for exactly this sort of data referencing. Often in CRUD applications, working with such joined data can significantly increase the complexity of the application and increase development time, Editor makes working with such join tables extremely easy through its LeftJoin() method. Complex joins with full CRUD support can be added in just minutes. Read more »

One-to-many Joins

Editor's LeftJoin() method is excellent when joining data which has a 1:1 relationship, however, often your data structure will require a one-to-many relationship. An example of this that is often used in the computing world is access privileges: a single user can have access to n systems (where n >= 0). To provide one-to-many support the Editor .NET libraries include an MJoin class (i.e. many join). Read more »

Where Conditions

When displaying data from a database to an end user you may require the ability to filter the data that the end user sees (for example based on account permissions or some other account access permissions). In SQL you would do this with a WHERE condition - the Editor .NET libraries also provide a Editor.Where() method to expose this functionality and allow complex conditional expressions. Read more »

Events

When working with complex data, it can often be useful to perform some additional action when Editor updates the database based on information from the client-side. This can take the form of modifying the Editor or Field instances for the action being taken, deleting files from the file system when rows are removed, or adding log information to a database about an action that a user has taken. To make this possible, the .NET Editor class emits a number of custom events, that can be subscribed to in the standard .NET event subscription manner. Read more »

File Upload

The Editor .NET libraries provide an Upload class that can be used with the upload and uploadMany field types to provide end users with the ability to upload files to a server. The goal of the Upload class is to make the server-side aspect of file uploading as simple as possible, while retaining the same flexibility that you would expect from the Editor libraries. Read more »