HopFrame.Web 1.1.0

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package HopFrame.Web --version 1.1.0
                    
NuGet\Install-Package HopFrame.Web -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HopFrame.Web" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HopFrame.Web" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="HopFrame.Web" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HopFrame.Web --version 1.1.0
                    
#r "nuget: HopFrame.Web, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=HopFrame.Web&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=HopFrame.Web&version=1.1.0
                    
Install as a Cake Tool

HopFrame Web module

This module contains useful helpers for Blazor Apps and an Admin Dashboard.

How to use the Blazor API

  1. Add the HopFrame.Web library to your project

    dotnet add package HopFrame.Web
    
  2. Create a DbContext that inherits the HopDbContext and add a data source

    public class DatabaseContext : HopDbContextBase {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
            base.OnConfiguring(optionsBuilder);
    
            optionsBuilder.UseSqlite("...");
        }
    }
    
  3. Add the DbContext and HopFrame to your services

    builder.Services.AddDbContext<DatabaseContext>();
    builder.Services.AddHopFrame<DatabaseContext>();
    
  4. Add the authentication middleware to your app

    app.UseMiddleware<AuthMiddleware>();
    
  5. 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 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.2.0 107 2/28/2025
3.1.1 102 1/31/2025
3.1.0 105 1/28/2025
3.0.0 177 1/19/2025