intern_CRUD_sql_command.md - brainchildservices/curriculum GitHub Wiki

Slide 1

CRUD Application

  1. Create INSERT, UPDATE, DELETE, SELECT SQL Commands for table Facilitator

Add dummy data to Facilitator, test SQL Commands for table Facilitator

  1. Create INSERT, UPDATE, DELETE, SELECT SQL Commands for table Learner

Add dummy data to Learner, test SQL Commands for table Learner

  1. Create INSERT, UPDATE, DELETE, SELECT SQL Commands for table Course

Add dummy data to Course, test SQL Commands for table Course

  1. Create INSERT, UPDATE, DELETE, SELECT SQL Commands for table Course Content

Add dummy data to Course Content, test SQL Commands for table Course Content

Slide 2

  • Inside Database folder create another folder table include the create sql query of tables one by one inside that folder.
  • The file names to be saved as dbo.Name.sql
  • Inside Database folder create another folder SQLCommands include the create sql query commands that were used on the dummy data.
  • Add more contents on ADO.NET using SQL server:::::

Create(Add) Records to Facilitator Table in your Database

  • Records adding in your ADD FACILITATOR UI should be added to your Database(under Facilitator Table).
  • ADO.NET SQL Commands and Statements for INSERT records have to be included in Code behind page of Respective Razor page . This part of code is the essential section where Data is getting added from UI to DATABASE and vice versa.

Slide 3

Update(Edit) Records in Facilitator Table

  • Records editing in your EDIT FACILITATOR UI should be refelected in your Database(in Facilitator Table).
  • ADO.NET SQL Commands and Statements for UPDATE records have to be included in Codebehind page of Respective Razor page .
  • In this particular CodeBehind page of Edit Razor page, UI should show the Database content so that user can edit.
    • for this purpose ADO.NET SQL Commands and Statements for SELECT records(READ records) should included in GET method of Edit page.

Delete Records from Database

  • Records deleting in your DELETE FACILITATOR UI should be deleted from your Database(in Facilitator Table).
  • In Delete , code behind page Get method should contain codes to access Data of Deleting Facilitators details and to show them in particular UI.
  • And Post method should include ADO.NET SQL Commands and Statements to DELETE records from Database.

Slide 4

Below Image Represent the Connection of all Data Process of CRUD:

ADO NET-Tutorial

Slide 5

Below image explaining flow of all Data in whole CRUD process discussed above:

image

Table creation is an easy process when using SQL Server or Visual Studio for your Database purpose.

  • Expand your respective Database and right click on Table, and then click on Add New Table

image