Skip to content

Commit 00370d3

Browse files
Update postgresql-server.md
1 parent dd8ed95 commit 00370d3

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

ej2-asp-core-mvc/grid/EJ2_ASP.MVC/connecting-to-database/postgresql-server.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ namespace MyWebService.Controllers
8484
[HttpGet]
8585
private List<Orders> GetOrderData()
8686
{
87-
// Define the SQL query to fetch all orders from the "Orders" table, ordered by OrderID.
87+
// Define the SQL query to fetch all orders from the orders table, ordered by OrderID.
8888
string query = "SELECT * FROM public.\"Orders\" ORDER BY \"OrderID\"";
8989

9090
// Establish a connection to the PostgreSQL database using the connection string.
@@ -275,7 +275,7 @@ public class GridController : ApiController
275275
[HttpGet]
276276
private List<Orders> GetOrderData()
277277
{
278-
// Define the SQL query to fetch all orders from the "Orders" table, ordered by OrderID.
278+
// Define the SQL query to fetch all orders from the orders table, ordered by OrderID.
279279
string query = "SELECT * FROM public.\"Orders\" ORDER BY \"OrderID\"";
280280

281281
// Establish a connection to the PostgreSQL database using the connection string.
@@ -620,7 +620,7 @@ To insert a new row, simply click the **Add** toolbar button. The new record edi
620620
{% highlight cs tabtitle="GridController.cs" %}
621621

622622
/// <summary>
623-
/// Inserts a new order record into the "Orders" table in the PostgreSQL database.
623+
/// Inserts a new order record into the orders table in the PostgreSQL database.
624624
/// </summary>
625625
/// <param name="value">The CRUDModel containing the order details to be inserted.</param>
626626
/// <returns>Returns an HTTP response indicating success or failure.</returns>
@@ -671,7 +671,7 @@ To edit a row, first select desired row and click the **Edit** toolbar button. T
671671
{% highlight cs tabtitle="GridController.cs" %}
672672

673673
/// <summary>
674-
/// Updates an existing order record in the "Orders" table in the PostgreSQL database.
674+
/// Updates an existing order record in the orders table in the PostgreSQL database.
675675
/// </summary>
676676
/// <param name="value">The CRUDModel containing the updated order details.</param>
677677
/// <returns>Returns an HTTP response indicating success or failure.</returns>
@@ -723,7 +723,7 @@ To delete a row, simply select the desired row and click the **Delete** toolbar
723723
{% highlight cs tabtitle="GridController.cs" %}
724724

725725
/// <summary>
726-
/// Deletes an order record from the "Orders" table in the PostgreSQL database.
726+
/// Deletes an order record from the orders table in the PostgreSQL database.
727727
/// </summary>
728728
/// <param name="value">The CRUDModel containing the OrderID of the record to be deleted.</param>
729729
/// <returns>Returns an HTTP response indicating success or failure.</returns>
@@ -741,7 +741,7 @@ public IHttpActionResult Remove(CRUDModel<Orders> value)
741741
// Open the database connection.
742742
Connection.Open();
743743

744-
// Define an SQL query to delete a record from the "Orders" table where OrderID matches.
744+
// Define an SQL query to delete a record from the orders table where OrderID matches.
745745
string queryStr = "DELETE FROM \"Orders\" WHERE \"OrderID\"=@OrderID";
746746

747747
// Create a command object to execute the delete query.
@@ -770,7 +770,7 @@ To perform batch operation, define the edit `Mode` as **Batch** and specify the
770770
{% highlight cs tabtitle="GridController.cs" %}
771771

772772
/// <summary>
773-
/// Performs batch update operations (insert, update, and delete) on the "Orders" table in a single transaction.
773+
/// Performs batch update operations (insert, update, and delete) on the orders table in a single transaction.
774774
/// </summary>
775775
/// <param name="value">The CRUDModel containing lists of added, changed, and deleted order records.</param>
776776
/// <returns>Returns an HTTP response indicating the success or failure of the batch operation.</returns>
@@ -790,7 +790,7 @@ public IHttpActionResult BatchUpdate(CRUDModel<Orders> value)
790790
// Process the list of updated records.
791791
if (value.changed != null && value.changed.Count > 0)
792792
{
793-
// Define an SQL query to update records in the "Orders" table.
793+
// Define an SQL query to update records in the orders table.
794794
string updateQuery = "UPDATE \"Orders\" SET \"CustomerID\"=@CustomerID, \"Freight\"=@Freight, \"EmployeeID\"=@EmployeeID, \"ShipCity\"=@ShipCity WHERE \"OrderID\"=@OrderID";
795795

796796
// Create a command object to execute the update query within the transaction.
@@ -818,7 +818,7 @@ public IHttpActionResult BatchUpdate(CRUDModel<Orders> value)
818818
// Process the list of newly added records.
819819
if (value.added != null && value.added.Count > 0)
820820
{
821-
// Define an SQL query to insert new records into the "Orders" table.
821+
// Define an SQL query to insert new records into the orders table.
822822
string insertQuery = "INSERT INTO \"Orders\" (\"CustomerID\", \"Freight\", \"ShipCity\", \"EmployeeID\") VALUES (@CustomerID, @Freight, @ShipCity, @EmployeeID)";
823823

824824
// Create a command object to execute the insert query within the transaction.
@@ -845,7 +845,7 @@ public IHttpActionResult BatchUpdate(CRUDModel<Orders> value)
845845
// Process the list of deleted records.
846846
if (value.deleted != null && value.deleted.Count > 0)
847847
{
848-
// Define an SQL query to delete records from the "Orders" table based on OrderID.
848+
// Define an SQL query to delete records from the orders table based on OrderID.
849849
string deleteQuery = "DELETE FROM \"Orders\" WHERE \"OrderID\"=@OrderID";
850850

851851
// Create a command object to execute the delete query within the transaction.
@@ -995,7 +995,7 @@ namespace MyWebService.Controllers
995995
[HttpGet]
996996
private List<Orders> GetOrderData()
997997
{
998-
// Define the SQL query to fetch all orders from the "Orders" table, ordered by OrderID.
998+
// Define the SQL query to fetch all orders from the orders table, ordered by OrderID.
999999
string query = "SELECT * FROM public.\"Orders\" ORDER BY \"OrderID\"";
10001000

10011001
// Establish a connection to the PostgreSQL database using the connection string.
@@ -1438,7 +1438,7 @@ To insert a new row, simply click the **Add** toolbar button. The new record edi
14381438
{% highlight cs tabtitle="GridController.cs" %}
14391439

14401440
/// <summary>
1441-
/// Inserts a new order record into the "Orders" table in the PostgreSQL database.
1441+
/// Inserts a new order record into the orders table in the PostgreSQL database.
14421442
/// </summary>
14431443
/// <param name="value">The CRUDModel containing the order details to be inserted.</param>
14441444
/// <returns>Returns an HTTP response indicating success or failure.</returns>
@@ -1526,7 +1526,7 @@ To edit a row, first select desired row and click the **Edit** toolbar button. T
15261526
{% highlight cs tabtitle="GridController.cs" %}
15271527

15281528
/// <summary>
1529-
/// Updates an existing order record in the "Orders" table in the PostgreSQL database.
1529+
/// Updates an existing order record in the orders table in the PostgreSQL database.
15301530
/// </summary>
15311531
/// <param name="value">The CRUDModel containing the updated order details.</param>
15321532
/// <returns>Returns an HTTP response indicating success or failure.</returns>
@@ -1615,7 +1615,7 @@ To delete a row, simply select the desired row and click the **Delete** toolbar
16151615
{% highlight cs tabtitle="GridController.cs" %}
16161616

16171617
/// <summary>
1618-
/// Deletes an order record from the "Orders" table in the PostgreSQL database.
1618+
/// Deletes an order record from the orders table in the PostgreSQL database.
16191619
/// </summary>
16201620
/// <param name="value">The CRUDModel containing the OrderID of the record to be deleted.</param>
16211621
/// <returns>Returns an HTTP response indicating success or failure.</returns>
@@ -1633,7 +1633,7 @@ public IHttpActionResult Remove(CRUDModel<Orders> value)
16331633
// Open the database connection.
16341634
Connection.Open();
16351635

1636-
// Define an SQL query to delete a record from the "Orders" table where OrderID matches.
1636+
// Define an SQL query to delete a record from the orders table where OrderID matches.
16371637
string queryStr = "DELETE FROM \"Orders\" WHERE \"OrderID\"=@OrderID";
16381638

16391639
// Create a command object to execute the delete query.
@@ -1700,7 +1700,7 @@ To perform batch operation, define the edit `Mode` as **Batch** and specify the
17001700
{% highlight cs tabtitle="GridController.cs" %}
17011701

17021702
/// <summary>
1703-
/// Performs batch update operations (insert, update, and delete) on the "Orders" table in a single transaction.
1703+
/// Performs batch update operations (insert, update, and delete) on the orders table in a single transaction.
17041704
/// </summary>
17051705
/// <param name="value">The CRUDModel containing lists of added, changed, and deleted order records.</param>
17061706
/// <returns>Returns an HTTP response indicating the success or failure of the batch operation.</returns>
@@ -1720,7 +1720,7 @@ public IHttpActionResult BatchUpdate(CRUDModel<Orders> value)
17201720
// Process the list of updated records.
17211721
if (value.changed != null && value.changed.Count > 0)
17221722
{
1723-
// Define an SQL query to update records in the "Orders" table.
1723+
// Define an SQL query to update records in the orders table.
17241724
string updateQuery = "UPDATE \"Orders\" SET \"CustomerID\"=@CustomerID, \"Freight\"=@Freight, \"EmployeeID\"=@EmployeeID, \"ShipCity\"=@ShipCity WHERE \"OrderID\"=@OrderID";
17251725

17261726
// Create a command object to execute the update query within the transaction.
@@ -1748,7 +1748,7 @@ public IHttpActionResult BatchUpdate(CRUDModel<Orders> value)
17481748
// Process the list of newly added records.
17491749
if (value.added != null && value.added.Count > 0)
17501750
{
1751-
// Define an SQL query to insert new records into the "Orders" table.
1751+
// Define an SQL query to insert new records into the orders table.
17521752
string insertQuery = "INSERT INTO \"Orders\" (\"CustomerID\", \"Freight\", \"ShipCity\", \"EmployeeID\") VALUES (@CustomerID, @Freight, @ShipCity, @EmployeeID)";
17531753

17541754
// Create a command object to execute the insert query within the transaction.
@@ -1775,7 +1775,7 @@ public IHttpActionResult BatchUpdate(CRUDModel<Orders> value)
17751775
// Process the list of deleted records.
17761776
if (value.deleted != null && value.deleted.Count > 0)
17771777
{
1778-
// Define an SQL query to delete records from the "Orders" table based on OrderID.
1778+
// Define an SQL query to delete records from the orders table based on OrderID.
17791779
string deleteQuery = "DELETE FROM \"Orders\" WHERE \"OrderID\"=@OrderID";
17801780

17811781
// Create a command object to execute the delete query within the transaction.
@@ -1860,4 +1860,4 @@ public IHttpActionResult BatchUpdate(CRUDModel<Orders> value)
18601860

18611861
When you run the application, the resultant Syncfusion ASP.NET MVC Grid will look like this
18621862

1863-
![Syncfusion ASP.NET MVC Grid bound with PostgreSQL Server data](../images/database/microsoft-sql-batch.gif)
1863+
![Syncfusion ASP.NET MVC Grid bound with PostgreSQL Server data](../images/database/microsoft-sql-batch.gif)

0 commit comments

Comments
 (0)