Generated SQL Scripts/Linq-to-Entities Queries


Listed below are quick descriptions of the SQL Stored Procedure, Ad-Hoc DQL, or Linq-to-Entities queries AspCoreGen 3.0 Razor generates. When you choose to generate stored procedures, these scripts are directly generated in the database. Otherwise, when you choose linq-to-entities or Ad-Hoc SQL, these SQL scripts are generated in class files added to the web application's Class Library project.

One of each of the following objects listed below may be generated per table in your database.

Generated Stored Procedures Quick Description
1. Select All

  - Sample Code

Retrieves all records from a table.
2. Select All By a Foreign Key

  - Sample Code

Retrieves all records from a table filtered by a foreign key. Generated for each foreign key in the table.
3. Select All Dynamic Where

  - Sample Code

Retrieves all records from a table filtered by one or more fields. Used for search.
4. Select a Record by Primary Key

  - Sample Code

Retrieves a record from a table filtered by the primary key.
5. Select Drop Down List Data

  - Sample Code

Retrieves the primary key and another field. Used for DropDownList web controls.
6. Select, Skip, and Take

  - Sample Code

Retrieves a specified amount of records. Fetches records from a specific pointer, while skipping some records.
7. Select, Skip, and Take By a Foreign Key

  - Sample Code

Retrieves a specified amount of records from a table filtered by a foreign key. Fetches records from a specific pointer, while skipping some records. Generated for each foreign key in the table.
8. Select, Skip, and Take Dynamic Where

  - Sample Code

Retrieves a specified amount of records from a table filtered by one or more fields. Fetches records from a specific pointer, while skipping some records. Used for search.
9. Select Totals

  - Sample Code

Retrieves aggregate sum of fields with money data type. Only generated for tables with money data type field.
10. Insert

  - Sample Code

Inserts one new record in table.
11. Update

  - Sample Code

Updates an existing record by primary key.
12. Delete

  - Sample Code

Deletes an existing record by primary key.
13. Get Record Count

  - Sample Code

Gets the number of records from a table.
14. Get Record Count by Foreign Key

  - Sample Code

Gets the number of records from a table filtered by a foreign key. Generated for each foreign key in the table.
15. Get Record Count Dynamic Where

  - Sample Code

Gets the number of records from a table filtered by one or more fields. Used for search.