Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (158).NET Core  (28).NET MAUI  (50)Angular  (67)ASP.NET  (50)ASP.NET Core  (78)ASP.NET MVC  (88)Azure  (32)Blazor  (144)DocIO  (23)Essential JS 2  (80)Essential Studio  (171)File Formats  (28)Flutter  (121)JavaScript  (179)Microsoft  (112)PDF  (67)React  (55)Succinctly series  (126)Syncfusion  (582)TypeScript  (30)Uno Platform  (3)UWP  (4)Vue  (36)Webinar  (32)Windows Forms  (58)WinUI  (45)WPF  (135)Xamarin  (153)XlsIO  (25)Other CategoriesBarcode  (5)BI  (29)Bold BI  (4)Build conference  (6)Business intelligence  (53)Button  (4)C#  (118)Chart  (56)Cloud  (11)Company  (445)Dashboard  (7)Data Science  (3)Data Validation  (6)DataGrid  (54)Development  (372)Doc  (7)DockingManager  (1)eBook  (95)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (23)Extensions  (17)File Manager  (4)Gantt  (11)Gauge  (9)Git  (4)Grid  (27)HTML  (10)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (298)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (29)Performance  (9)PHP  (1)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (7)Road Map  (10)Scheduler  (36)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (22)Solution Services  (2)Spreadsheet  (11)SQL  (8)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (11)Tips and Tricks  (91)UI  (209)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (23)Visual Studio Code  (14)Web  (341)What's new  (194)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Share on twitter
Share on facebook
Share on linkedin
CRUD Operations Using Blazor and MongoDB [Webinar Show Notes]

CRUD Operations Using Blazor and MongoDB [Webinar Show Notes]

This blog provides show notes for our August 18, 2022, webinar, “Performing CRUD operations using Blazor and MongoDB.” The webinar was presented and hosted by Syncfusion developer Christopher K. If you missed it, or would like to watch it again, you can find it on our YouTube channel or embedded here.

The Q&A segment of the webinar is provided at the end of this blog post.

Overview

In this webinar, we learned to perform create, read, update, and delete (CRUD) operations using the Syncfusion Blazor DataGrid component and MongoDB as the database provider.

Agenda

  • Install MongoDB 6.0 in Windows and configure a MongoDB database.
  • Create a simple Blazor application with Syncfusion Blazor DataGrid, configure CRUD operations, and connect it with the MongoDB database.
  • Perform CRUD operations in the Blazor DataGrid and MongoDB database.

Install MongoDB 6.0 on Windows

Configure MongoDB 6.0 on Windows

  • Configure MongoDB on a PC.
  • Connect and create a database using MongoDB Compass.
  • Add an initial data collection.

Create a simple Blazor app

Prerequisites

  • Install the .NET Core 2.1 SDK or above.
  • Install the latest version of Visual Studio 2017 or above.

Procedure

  • Create a simple Blazor application.
  • Add the Syncfusion Blazor DataGrid.
  • Configure CRUD operations.
  • Connect the DataGrid with the MongoDB database.

Q&A

Can we connect to MongoDB using a service? Something like:

#region Get List of SavedUsers
public async Task<List<AspNetUsers>> GetAllSavedUsersAsync()
{
return await _metricLogiranjeContext.AspNetUsers.AsQueryable().Where(x => x.Email != null).OrderBy(x => x.Email).ToListAsync(); ;
}
#endregion

Yes. You can do this in the newer versions of MongoDB. You need to include MongoDB.Driver.Linq namespace at the top like this:

using MongoDB.Driver.Linq;

Will there be a link to the sample project used in the webinar?

Yes, you can get the sample application from this GitHub location.

I perform CRUD with a SQL statement insert and then use SfGrid.Refresh() to refresh the grid but it is not working. Do you have a sample code?

Yes, we have sample code in the following GitHub location, and we also cover this topic in our documentation:

Recommended resources (related links)

Tags:

Share this post:

Share on twitter
Share on facebook
Share on linkedin
Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top