| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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.
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:
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);(you will be redirected to DevExpress.com to submit your response)
| Back | FazBrowse Home | New Git URL |