CheapHelpers.Services 1.1.4

dotnet add package CheapHelpers.Services --version 1.1.4
                    
NuGet\Install-Package CheapHelpers.Services -Version 1.1.4
                    
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="CheapHelpers.Services" Version="1.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CheapHelpers.Services" Version="1.1.4" />
                    
Directory.Packages.props
<PackageReference Include="CheapHelpers.Services" />
                    
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 CheapHelpers.Services --version 1.1.4
                    
#r "nuget: CheapHelpers.Services, 1.1.4"
                    
#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 CheapHelpers.Services@1.1.4
                    
#: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=CheapHelpers.Services&version=1.1.4
                    
Install as a Cake Addin
#tool nuget:?package=CheapHelpers.Services&version=1.1.4
                    
Install as a Cake Tool

CheapHelpers

A collection of production-ready C# utilities, extensions, and services for .NET 10.0 development. Simplify common development tasks with battle-tested helpers for Blazor, Entity Framework, networking, email, PDF generation, and more.

Packages

Package Version Description
CheapHelpers NuGet Core utilities, extensions, and helpers
CheapHelpers.Models NuGet Shared data models and DTOs
CheapHelpers.EF NuGet Entity Framework repository pattern
CheapHelpers.Services NuGet Business services and integrations
CheapHelpers.Blazor NuGet Blazor components, UI utilities, and Hybrid features
CheapHelpers.Networking NuGet Network scanning and device discovery
CheapHelpers.MAUI NuGet MAUI platform implementations (iOS APNS, Android FCM)

Installation

# Core utilities and extensions
dotnet add package CheapHelpers

# Entity Framework repository pattern
dotnet add package CheapHelpers.EF

# Business services (email, PDF, Azure)
dotnet add package CheapHelpers.Services

# Blazor components and Hybrid features
dotnet add package CheapHelpers.Blazor

# Network scanning and device discovery
dotnet add package CheapHelpers.Networking

# MAUI platform implementations
dotnet add package CheapHelpers.MAUI

Quick Start

String Extensions

using CheapHelpers.Extensions;

"hello world".Capitalize();  // "Hello world"
"0474123456".ToInternationalPhoneNumber("BE");  // "+32474123456"
"Very long text...".ToShortString(10);  // "Very lo..."

Memory Caching

using CheapHelpers.Caching;

// Sliding expiration - items expire after 30 minutes of inactivity
using var cache = new SlidingExpirationCache<User>("UserCache", TimeSpan.FromMinutes(30));
var user = await cache.GetOrAddAsync("user:123", async key => await database.GetUserAsync(key));

Entity Framework Repository

using CheapHelpers.EF.Repositories;

public class ProductRepo : BaseRepo<Product, MyDbContext>
{
    public ProductRepo(MyDbContext context) : base(context) { }
}

var products = await productRepo.GetAllPaginatedAsync(pageIndex: 1, pageSize: 20);

Network Scanning

using CheapHelpers.Networking.Extensions;

services.AddNetworkScanning()
    .AddAllDetectors()  // UPnP, mDNS, HTTP, SSH, Windows Services
    .AddJsonStorage();

var scanner = serviceProvider.GetRequiredService<INetworkScanner>();
scanner.Start();  // Background scanning

scanner.DeviceDiscovered += (device) =>
{
    Console.WriteLine($"Found: {device.Name} ({device.IPv4Address}) - {device.Type}");
};

Email with Templates

using CheapHelpers.Services.Email;

services.AddEmailService(options =>
{
    options.SmtpServer = "smtp.gmail.com";
    options.SmtpPort = 587;
});

await emailService.SendEmailAsync(
    recipient: "user@example.com",
    subject: "Welcome!",
    body: "<h1>Welcome to our app!</h1>"
);

Blazor Hybrid Push Notifications (MAUI)

// In MauiProgram.cs
builder.Services.AddBlazorHybridPushNotifications();
builder.Services.AddMauiPushNotifications();  // iOS APNS + Android FCM

// In your Blazor component
var status = await RegistrationManager.CheckDeviceStatusAsync(userId);
if (status == DeviceRegistrationState.NotRegistered)
{
    await RegistrationManager.RegisterDeviceAsync(userId);
}

Documentation

Detailed documentation for each package:

Core Package

Entity Framework

Services

Blazor

Networking

MAUI

Requirements

  • .NET 10.0 or later
  • C# 14.0 or later

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

git clone https://github.com/CheapNud/CheapHelpers.git
cd CheapHelpers
dotnet restore
dotnet build

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on CheapHelpers.Services:

Package Downloads
CheapHelpers.Blazor

Blazor Server components, services, and utilities with MudBlazor integration, authentication support, and Blazor Hybrid features (WebView bridge, push notifications for MAUI/Photino/Avalonia)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.4 200 11/4/2025
1.1.3 193 11/3/2025
1.1.2 132 11/1/2025
1.0.0 137 11/1/2025