HopFrame.Web
1.1.0
See the version list below for details.
dotnet add package HopFrame.Web --version 1.1.0
NuGet\Install-Package HopFrame.Web -Version 1.1.0
<PackageReference Include="HopFrame.Web" Version="1.1.0" />
paket add HopFrame.Web --version 1.1.0
#r "nuget: HopFrame.Web, 1.1.0"
// Install HopFrame.Web as a Cake Addin #addin nuget:?package=HopFrame.Web&version=1.1.0 // Install HopFrame.Web as a Cake Tool #tool nuget:?package=HopFrame.Web&version=1.1.0
HopFrame Web module
This module contains useful helpers for Blazor Apps and an Admin Dashboard.
How to use the Blazor API
Add the HopFrame.Web library to your project
dotnet add package HopFrame.Web
Create a DbContext that inherits the
HopDbContext
and add a data sourcepublic class DatabaseContext : HopDbContextBase { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { base.OnConfiguring(optionsBuilder); optionsBuilder.UseSqlite("..."); } }
Add the DbContext and HopFrame to your services
builder.Services.AddDbContext<DatabaseContext>(); builder.Services.AddHopFrame<DatabaseContext>();
Add the authentication middleware to your app
app.UseMiddleware<AuthMiddleware>();
Add the HopFrame pages to your Razor components
app.MapRazorComponents<App>() .AddHopFrameAdminPages() .AddInteractiveServerRenderMode();
Services added in this module
You can use these services by specifying them as a dependency. All of them are scoped dependencies.
IAuthService
This service handles all the authentication like login or register. It properly creates all tokens so the user can be identified
public interface IAuthService {
Task Register(UserRegister register);
Task<bool> Login(UserLogin login);
Task Logout();
Task<TokenEntry> RefreshLogin();
Task<bool> IsLoggedIn();
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- BlazorStrap (>= 5.2.100.61524)
- BlazorStrap.V5 (>= 5.2.100)
- CurrieTechnologies.Razor.SweetAlert2 (>= 5.6.0)
- HopFrame.Database (>= 1.1.0)
- HopFrame.Security (>= 1.1.0)
- Microsoft.AspNetCore.Components (>= 8.0.7)
- Microsoft.AspNetCore.Components.Web (>= 8.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.