From 31fcdd018665ea59bfe865b9ca47836b0a77fa9e Mon Sep 17 00:00:00 2001 From: "vignesh.natarajan@syncfusion.com" Date: Tue, 5 Mar 2024 19:29:18 +0530 Subject: [PATCH 1/2] added missing aggregate codes --- .../MyWebService/MyWebService/Controllers/GridController.cs | 1 + .../Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Binding MS SQL database using UrlAdaptor/Blazor WASM app/MyWebService/MyWebService/Controllers/GridController.cs b/Binding MS SQL database using UrlAdaptor/Blazor WASM app/MyWebService/MyWebService/Controllers/GridController.cs index f18008c..6183e05 100644 --- a/Binding MS SQL database using UrlAdaptor/Blazor WASM app/MyWebService/MyWebService/Controllers/GridController.cs +++ b/Binding MS SQL database using UrlAdaptor/Blazor WASM app/MyWebService/MyWebService/Controllers/GridController.cs @@ -41,6 +41,7 @@ public object Post([FromBody] DataManagerRequest DataManagerRequest) } int count = DataSource.Cast().Count(); // Handling Aggregation in Url Adaptor. + IDictionary Aggregates = null; if (DataManagerRequest.Aggregates != null) // Aggregation { Aggregates = DataUtil.PerformAggregation(DataSource, DataManagerRequest.Aggregates); diff --git a/Binding MS SQL database using UrlAdaptor/Blazor Web app/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs b/Binding MS SQL database using UrlAdaptor/Blazor Web app/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs index 971510d..210c7e7 100644 --- a/Binding MS SQL database using UrlAdaptor/Blazor Web app/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs +++ b/Binding MS SQL database using UrlAdaptor/Blazor Web app/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs @@ -44,6 +44,7 @@ public object Post([FromBody] DataManagerRequest DataManagerRequest) } int count = DataSource.Cast().Count(); // Handling Aggregation in Url Adaptor. + IDictionary Aggregates = null; if (DataManagerRequest.Aggregates != null) // Aggregation { Aggregates = DataUtil.PerformAggregation(DataSource, DataManagerRequest.Aggregates); From e6b55d9d3a42da80cc59c5420158e520cb10935a Mon Sep 17 00:00:00 2001 From: VigneshNatarajan27 <44961462+VigneshNatarajan27@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:33:38 +0530 Subject: [PATCH 2/2] Update OrderData.cs --- .../Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Data/OrderData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Binding MS SQL database using CustomAdaptor/Blazor Web app/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Data/OrderData.cs b/Binding MS SQL database using CustomAdaptor/Blazor Web app/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Data/OrderData.cs index de3407b..eebd8c7 100644 --- a/Binding MS SQL database using CustomAdaptor/Blazor Web app/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Data/OrderData.cs +++ b/Binding MS SQL database using CustomAdaptor/Blazor Web app/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL/Data/OrderData.cs @@ -21,7 +21,7 @@ public async Task> GetOrdersAsync() Connection.Open(); // Using SqlDataAdapter, process the query string and fill the data into the dataset Adapter.Fill(Data); - //Cast the data fetched from Adaptor to List + //Cast the data fetched from Adapter to List Orders = Data.Tables[0].AsEnumerable().Select(r => new Order { OrderID = r.Field("OrderID"),