Skip to content

DevExpress-Examples/BlazorServerMode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid for Blazor - Server Mode Data Processing

This example demonstrates the difference between local and server-side data loading strategies for a Blazor Server app connected to a large database via Entity Framework Core.

Use a Real Database

For simplicity, this example generates an in-memory database that does not use SQL queries. If you want to test the sample with a real database, use the link below to download a sample large database file:

Download - Issues.zip

Unpack the archive into the project folder and change database connection settings in Program.cs:

builder.Services.AddDbContext<IssuesContext>((sp, options) => {
    var env = sp.GetRequiredService<IWebHostEnvironment>();
    var dbPath = Path.Combine(env.ContentRootPath, "Issues.mdf");
    options.UseSqlServer("Server=(localdb)\\MSSQLLocalDB;Integrated Security=true;AttachDbFileName=" + dbPath);
}, contextLifetime: ServiceLifetime.Transient);
//builder.Services.AddDbContext<IssuesContext>((sp, options) => options.UseInMemoryDatabase("Issues"), contextLifetime: ServiceLifetime.Transient);

Files to Review

Documentation

Free Trial

Download a 30-day trial of DevExpress Blazor components here: Free DevExpress Trial.

About

See the difference between local and server-side data loading strategies for a Blazor Server app connected to a large database via Entity Framework Core.

Topics

Resources

License

Stars

Watchers

Forks