Skip to content

951563: Connecting to database - Entity framework #4135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 16, 2025

Conversation

NithyaSivaprakasam
Copy link
Contributor

No description provided.

@NithyaSivaprakasam
Copy link
Contributor Author

Rebuild


**2. Using CustomAdaptor**

The [CustomAdaptor](https://ej2.syncfusion.com/aspnetcore/documentation/grid/connecting-to-adaptors/custom-adaptor) serves as a mediator between the UI component and the database for data binding. While the data source from the database can be directly bound to the Syncfusion ASP.NET Core Grid locally using the `DataSource` property, the `CustomAdaptor` approach is preferred as it allows for customization of both data operations and CRUD operations according to specific requirements. In this approach, for every action in the Grid, a corresponding request with action details is sent to the `CustomAdaptor`. The Grid provides predefined methods to perform data operations such as **searching**, **filtering**, **sorting**, **aggregation**, **paging** and **grouping**. Alternatively, your own custom methods can be employed to execute operations and return the data in the `result` and `count` format for displaying in the Grid. Additionally, for CRUD operations, predefined methods can be overridden to provide custom functionality. Further details on this can be found in the latter part of the documentation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataSource property not present in all platforms


![Hosted API URL](../images/Ms-Sql-data.png)

### Connecting Syncfusion ASP.NET Core Grid to an API Service
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Service needs to be in smaller casing


## Binding data from Microsoft SQL Server using Entity Framework with CustomAdaptor

This section describes step by step process how to retrieve data from a Microsoft SQL Server using [CustomAdaptor](https://ej2.syncfusion.com/aspnetcore/documentation/grid/connecting-to-adaptors/custom-adaptor) and bind it to the Syncfusion ASP.NET Core Grid.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this Entity Framework or Microsoft sql server


### Handling CRUD operations

To enable editing in the Syncfusion ASP.NET Core Grid, utilize the [e-grid-editSettings](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html) property. The Grid offers multiple edit modes including the **Inline/Normal**, **Dialog** and **Batch** editing. For more details, refer to the Grid [editing](https://ej2.syncfusion.com/aspnetcore/documentation/grid/editing/edit) documentation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utilize the [e-grid-editSettings] -> just use editSettings

</e-data-manager>
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Normal"></e-grid-editSettings>
<e-grid-columns>
<e-grid-column field='OrderID' headerText='Order ID' width='120' textAlign='Right' isPrimaryKey=true></e-grid-column>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isIdentity not present in column definition

@SyncfusionBuild
Copy link
Collaborator

Build Status: INPROGRESS 🔃
Build Location: 951563-entity-core-hf

@SyncfusionBuild
Copy link
Collaborator

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 951563-entity-core-hf
Image Alt Text Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Image Size Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Image Name Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
FT Layout Syntax Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Front matter Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
File Path Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
MD Tag Validation Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)

@SyncfusionBuild
Copy link
Collaborator

Build Status: INPROGRESS 🔃
Build Location: 951563-entity-core-hf

@SyncfusionBuild
Copy link
Collaborator

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 951563-entity-core-hf
Image Alt Text Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Image Size Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Image Name Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
FT Layout Syntax Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Front matter Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
File Path Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
MD Tag Validation Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)

@SyncfusionBuild
Copy link
Collaborator

Build Status: INPROGRESS 🔃
Build Location: 951563-entity-core-hf

@SyncfusionBuild
Copy link
Collaborator

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 951563-entity-core-hf
Image Alt Text Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Image Size Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Image Name Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
FT Layout Syntax Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Front matter Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
File Path Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
MD Tag Validation Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)

@SyncfusionBuild
Copy link
Collaborator

Build Status: INPROGRESS 🔃
Build Location: 951563-entity-core-hf

@SyncfusionBuild
Copy link
Collaborator

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 951563-entity-core-hf
Image Alt Text Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Image Size Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Image Name Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
FT Layout Syntax Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
Front matter Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
File Path Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)
MD Tag Validation Error(s): 0 (Critical: 0, High: 0, Medium: 0, Low: 0, Info: 0)

@farveensulthana farveensulthana merged commit 1b6f627 into hotfix/hotfix-v29.1.33 Apr 16, 2025
1 check passed
@farveensulthana farveensulthana deleted the 951563-entity-core-hf branch April 16, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants