Generated Demos & Code Examples


Click the links provided below for sample code of the respective features.

Note: Samples were taken from the generated code based on Microsoft's Northwind SQL database. Most of the sample code below were generated using the Products table and the related Categories and Suppliers tables. All code were generated in One Click in under a minute.

Note: All these generated code in One Click*.

Listed below are the main list of items generated by AspCoreGen 2.0 Razor. A lot more items are generated which are not listed below like the Miscellaneous Items and more.

Generated ASP.NET Core Web Project


Home Page
Index.cshtml

Contains the list of generated applications: ASP.NET Core Web project, Class Library project, and the optional ASP.NET Core Web API project. Each project in the list contains the main files generated for the respective application. This is the Home Page (Index.cshtml) for the generated Solution. Contains list of all the main generated Razor Pages, Business Objects, Data Layer, Models, Web API Controllers, Stored Proceduress, Linq-to-Entities, Ad-Hoc SQL, etc.

The list of Razor Pages are clickable so you can see the functionalities of each razor page.
Demo


One of each of the following Razor Pages is generated per database table.

Note: Razor Pages with grouping such as the Master-Detail, or List with Grouping are only generated for tables that have foreign keys. Each foreign key in the table will have the respective generated "grouping razor page" code.

See the description of each Razor Page and Controller listed below in the Generated Presentation Layer page.

Generated Razor Pages (.cshtml)
1. List with Add, Edit Redirect & Delete Sample Code   |   Demo
2. Add New Record Sample Code   |   Demo
3. Update Record Go to the List with Add, Edit Redirect & Delete to demo the Update functionality

Sample Code
4. Record Details (Read Only) Go to the List (Read-Only) to demo the Record Details functionality

Sample Code
5. List (Read-Only) Sample Code   |   Demo
6. List with Add, Edit, & Delete (Same Page) Sample Code   |   Demo
7. List with Grouping Sample Code   |   Demo
8. List with Totals Sample Code   |   Demo
9. List with Totals and Grouping Sample Code   |   Demo
10. List with Search Sample Code   |   Demo
11. List with Scroll-Loading Data Sample Code   |   Demo
12. List with Inline Add and Edit Sample Code   |   Demo
13. List with Manual For Each Loop Sample Code   |   Demo
14. List with Master Detail (Grid) Sample Code   |   Demo
15. List with Master Detail (Sub Grid) Sample Code   |   Demo
16. Unbound Razor Page Sample Code   |   Demo
17. Add/Edit Partial Razor Page Sample Code


One of each of the following Razor Page Model is generated per database table.

Generated Razor Page Models (.cshtml.cs)
1. Razor Page Model Class Sample Code


One of the following Example Class is generated per database table.

Generated (Middle-Tier Access) Examples Class (.cs)
1. Example Class Sample Code


Generated Class Library Project


One of each of the following Classes is generated per database table.

See the description of each Middle Tier Class, Models, and listed below in the Generated Middle Layer page.

Generated Middle Tier (.cs)
1. Business Object Base Class Sample Code
2. Business Object Class Sample Code

Generated Models (.cs)
1. Model Base Class Sample Code
2. Model Class Sample Code


See the description of each Data Layer Class, Ad-Hoc SQL Class, and Linq-To-Entity Class listed below in the Generated Data Layer page.

Generated Data Tier (.cs)
1. Data Layer Base Class Sample Code
2. Data Layer Class Sample Code


One of each of the respective Class is generated per database table when Ad-Hoc SQL or Linq-To-Entities is selected during code generation.

Generated Ad-Hoc SQL or Linq-to-Entity (.cs)
1. Ad-Hoc SQL Class Sample Code
2. Linq-To-Entity (Entity Framework Core) Class Sample Code


Generated ASP.NET Web API Project


One of each of the following Classes is generated per database table.

See the description of each Web API Controller listed below in the Generated Web API page.

Generated Web API (.cs)
1. Web API Controller Base Class Sample Code
2. Web API Controller Class Sample Code


Generated T-SQL Scripts


One of each of the following script is generated per database table. Some of the scripts below are only generated for tables with foreign keys such as the Select Drop Down List Data script.

See the description of each Stored Procedure below in the Generated SQL page.

Generated SQL Script - Stored Procedures
1. Select All Sample Code
2. Select All By a Foreign Key Sample Code
3. Select All Dynamic Where Sample Code
4. Select a Record by Primary Key Sample Code
5. Select Drop Down List Data Sample Code
6. Select, Skip, and Take Sample Code
7. Select, Skip, and Take By a Foreign Key Sample Code
8. Select, Skip, and Take Dynamic Where Sample Code
9. Select Totals Sample Code
10. Insert Sample Code
11. Update Sample Code
12. Delete Sample Code
13. Get Record Count Sample Code
14. Get Record Count by Foreign Key Sample Code
15. Get Record Count Dynamic Where Sample Code


Generated Web Project Examples


You can download six sample projects below generated by AspCoreGen 2.0 Razor. Please make sure to read the Readme.txt file for instructions. You will need Visual Studio 2017 and Microsoft SQL Server with the Microsoft Northwind database installed to use any of these sample projects. You also need to install the .NET Core 2.1 SDK in your machine. Right-click the download links below and choose "Save target as" in the context menu, and save it to your computer.

1. Entity Framework Sample Project

This solution contains 2 projects; an ASP.NET Core 2.1. Web Application and a .NET Core 2.1 Class Library Project. The Data Layer accesses the database using Entity Framework Core.

Download Sample Code
2. Entity Framework Using Web API Sample Project

This solution contains 3 projects; an ASP.NET Core 2.1. Web Application, a .NET Core 2.1 Class Library Project, and an ASP.NET Core 2.1. Web API Application. The Data Layer accesses the database using Entity Framework Core while the Middle Tier is encapsulated through a Web API call.

Download Sample Code
3. Stored Procedures Sample Project

This solution contains 2 projects; an ASP.NET Core 2.1. Web Application (.NET Framework) and a .NET Core 2.1 Class Library Project (.NET Framework). The Data Layer accesses the database using Classic ADO.NET calling Stored Procedures.

Download Sample Code
4. Stored Procedures Using Web API Sample Project

This solution contains 2 projects; an ASP.NET Core 2.1. Web Application (.NET Framework), .NET Core 2.1 Class Library Project (.NET Framework), and an ASP.NET Core 2.1. Web API Application (.NET Framework). The Data Layer accesses the database using Classic ADO.NET calling Stored Procedures while the Middle Tier is encapsulated through a Web API call.

Download Sample Code
5. Ad-Hoc SQL Sample Project

This solution contains 2 projects; an ASP.NET Core 2.1. Web Application (.NET Framework) and a .NET Core 2.1 Class Library Project (.NET Framework). The Data Layer accesses the database using Classic ADO.NET using Ad-Hoc SQL embedded in Classes.

Download Sample Code
6. Ad-Hoc SQL Using Web API Sample Project

This solution contains 2 projects; an ASP.NET Core 2.1. Web Application (.NET Framework), .NET Core 2.1 Class Library Project (.NET Framework), and an ASP.NET Core 2.1. Web API Application (.NET Framework). The Data Layer accesses the database using Classic ADO.NET using Ad-Hoc SQL embedded in Classes, while the Middle Tier is encapsulated through a Web API call.

Download Sample Code