BlazorDeployService 1.0.99

dotnet add package BlazorDeployService --version 1.0.99
                    
NuGet\Install-Package BlazorDeployService -Version 1.0.99
                    
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="BlazorDeployService" Version="1.0.99" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazorDeployService" Version="1.0.99" />
                    
Directory.Packages.props
<PackageReference Include="BlazorDeployService" />
                    
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 BlazorDeployService --version 1.0.99
                    
#r "nuget: BlazorDeployService, 1.0.99"
                    
#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.
#:package BlazorDeployService@1.0.99
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlazorDeployService&version=1.0.99
                    
Install as a Cake Addin
#tool nuget:?package=BlazorDeployService&version=1.0.99
                    
Install as a Cake Tool

BlazorDeployService

Blazor Blazor Blazor NuGet License


BlazorDeployService – Full Documentation

A complete service & component package for Blazor WebAssembly, designed for production-grade applications.


✨ Key Features

🟦 Zero-Backend SQL Service

Connect Blazor WebAssembly directly to SQL Server or Oracle using the built-in API handler — no backend needed.

🟦 Multi-Language System (Localization Cache)

High-performance caching, instant switching, auto UI refresh.

🟦 Dynamic Theme Management

Light/Dark/Custom themes with persistent storage.

🟦 Bootstrap-Based UI Components

Forms, inputs, grids, dialogs, utilities — optimized for WASM.

🟦 Global Modal System

Type-safe, parameterized modal windows with return values.

🟦 Alert & Notification Service

Success / Error / Warning / Info — fully async.

🟦 Secure Local & Session Storage

AES-encrypted browser storage.

🟦 Culture Handling (RTL/LTR)

Automatic directional switching when changing language.

🟦 API SQL Request Handler

Send SQL queries → receive DataTable / JSON results.


🚀 Installation

Install-Package BlazorDeployService

🟦 Program.cs Setup

using BlazorDeployService.Extensions;
.
.
.
builder.Services.AddBlazorDeployServices(builder.Configuration);

🟦 Razor Imports

@using BlazorDeployService.Services
@using BlazorDeployService.Components

🟦 MainLayout.razor Setup

Inject services

@inject CultureService cultureService
@inject LocalizationCacheService _cache
@inject ThemeService Theme
@inject IModalService ModalService

Place shared UI components

<ThemeSelector />
<LanguageSelector />
<Modal />

Initialization code

@code {
    protected override async Task OnInitializedAsync()
    {
        _cache.OnChange += StateHasChanged; // All Page 
        Theme.OnThemeChanged += OnThemeChanged;
        Theme.OnDarkModeChanged += OnDarkModeChanged;
        cultureService.OnCultureChanged += StateHasChanged;

        await cultureService.InitializeAsync();
        await cultureService.ApplyDirectionAsync();
        await Theme.InitializeAsync();
        await _cache.InitializeAsync();
        await ModalService.InitializeAsync();
    }

    private void OnThemeChanged(string theme) => InvokeAsync(StateHasChanged);
    private void OnDarkModeChanged(bool isDark) => InvokeAsync(StateHasChanged);
}

🟦 appsettings.json Configuration

{
  "BlazorDeploy": {
    "ApiSettings": {
      "BaseUrl": "https://api.blazordeploy.ir/api/",
      "AppToken": "XXXXXXX",
      "ApiKey": null,
      "publickey": "XXXXXX",
      "privatekey": "XXXXXX",
      "Timeout": 30000
    },
    "Encryption": {
      "Enabled": true,
      "Key": "XXXX"
    },
    "Localization": {
      "SupportedLanguageCodes": [ "fa-IR", "en-US", "ar-SA" ],
      "DefaultLanguage": "fa-IR",
      "EnableAutoDetection": true
    },
    "Deployment": {
      "MaxRetries": 3,
      "RetryDelay": 1000
    }
  }
}

🟦 Components

🎨 ThemeSelector

<ThemeSelector />

🌐 LanguageSelector

<LanguageSelector />

🪟 Modal Host (Required)

<Modal />

🪟 CKEditorBlazor

if UrlToPostImage is null automatic connect Api BlazorDeployService in Config AppSetting With BaseUrl And AppToken

    <CKEditorBlazor Id="MyEditor1" 
                    @bind-Value="text"
                    UrlToPostImage="http://localhost:44301/api/Upload/uploadImage">
    </CKEditorBlazor>

@code {
	string text ;
    }

🟦 Modal Service Usage

@inject IModalService ModalService

<button class="btn btn-primary" @onclick="OpenUserModal">Open User Modal</button>

@code {
    private async Task OpenUserModal()
    {
        var parameters = new Dictionary<string, object>
        {
            { "UserName", "Test User" },
            { "UserEmail", "test@example.com" }
        };

        var result = await ModalService.Show<UserForm>("User Form", parameters);

        if (result != null)
        {
            _userData = result;
            StateHasChanged();
        }
    }
}

🟦 Injecting Core Services

@inject RequestService _req
@inject LocalizationCacheService _cache
@inject CultureService _cult
@inject IClientStorageService clientStorage
@inject IAlertService AlertService

🟦 Localization Example

<PageTitle>@_cache.GetValue("Home")</PageTitle>
<p>@_cache.GetValue("گروه کل")</p>

🟦 SQL Request Example

<button class="btn btn-sm btn-success" @onclick="onClick">SQL Version</button>
<p>@version</p>

@code {
    string version = string.Empty;

    protected override Task OnInitializedAsync()
    {
        _cache.OnChange += StateHasChanged;
        _cult.OnCultureChanged += StateHasChanged;
        return base.OnInitializedAsync();
    }

    async Task onClick()
    {
        await AlertService.ShowInfoAsync("Loading", "Reading data...");

        var dataTable = await _req.Request(
            "XXXX",
            "select @@VERSION, @id as id",
            new { id = 1 }
        );

        if (dataTable != null)
        {
            version = dataTable.Rows[0][0]?.ToString() ?? "";
            await AlertService.ShowSuccessAsync("Success", "Data loaded successfully");
        }
        else
        {
            await AlertService.ShowErrorAsync("Error", "Failed to load data");
        }

        StateHasChanged();
    }
}

🟦 Available Services

Service Description
RequestService Execute SQL via API → DataTable output
LocalizationCacheService Multi-language text caching
CultureService Culture management + RTL/LTR switching
ThemeService Light/Dark/Custom theme manager
IModalService Global modal interface
IAlertService Toast alerts + notifications
IClientStorageService Encrypted local/session storage
AppHelper Helper constants

✔ Summary

BlazorDeployService provides everything needed for building professional Blazor WebAssembly applications:

  • Modern theme system
  • Full localization engine
  • RTL/LTR support
  • Secure storage
  • Global modals
  • Alerts & notifications
  • SQL-over-API execution
  • Production-ready UI components

Ideal for dashboards, admin panels, enterprise apps, and multilingual systems.


📞 Support / Test Token

For free APPToken testing:

📧 Email: mtnprog@gmail.com
🌐 Website: blazordeploy.ir
🐛 Issues: GitHub Issues


🏗 Built With

Blazor WebAssembly — .NET 8

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-browser1.0 is compatible.  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 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-browser1.0 is compatible.  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 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-browser1.0 is compatible.  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
1.0.99 167 1/6/2026
1.0.98 132 1/6/2026
1.0.97 130 1/4/2026
1.0.96 125 1/4/2026
1.0.95 123 1/3/2026
1.0.94 131 1/2/2026
1.0.93 125 1/2/2026
1.0.92 121 1/2/2026
1.0.91 122 1/2/2026
1.0.90 121 1/2/2026
1.0.89 120 1/2/2026
1.0.88 123 1/2/2026
1.0.87 118 12/31/2025
1.0.86 121 12/31/2025
1.0.85 116 12/31/2025
1.0.84 113 12/31/2025
1.0.83 117 12/31/2025
1.0.82 117 12/31/2025
1.0.81 111 12/31/2025
1.0.80 114 12/31/2025
Loading failed