EPPlus in .NET , Reading and manipulating Excel files

EPPlus is a powerful and easy-to-use .NET library for reading, creating, and modifying Excel .xlsx files (Office Open XML format).
It provides an API similar to working with Excel itself — with support for formulas, charts, tables, styles, data validation, pivot tables, and more — all without needing Excel installed.

It’s ideal for:

  • Generating Excel reports dynamically
  • Importing or exporting data from databases
  • Creating dashboards or analytics reports
  • Building REST APIs that return Excel files
Vahid Arya
46 0
Implement outbox pattern using CAP library

CAP is a .NET library that helps implement the Outbox Pattern and distributed event publishing reliably.

It supports multiple databases (SQL Server, MySQL, PostgreSQL, etc.) and message brokers (RabbitMQ, Kafka, Azure Service Bus).

It automatically stores events in an outbox table within your database transaction and publishes them asynchronously.

It handles retries, failure scenarios, and event deduplication.

CAP is a great fit if you want out-of-the-box support for transactional outbox + message broker integration.

It abstracts away a lot of complexity.

Widely used in .NET microservice and event-driven architectures.

  • Transactional consistency: Your business data and events are saved atomically.
  • Reliable event publishing: Events are published asynchronously with retries.
  • Supports multiple brokers and databases.
  • Minimal setup: Integrates easily with EF Core and other ORMs.
  • Automatic cleanup and monitoring.
  • Helps you avoid reinventing the wheel.
Vahid Arya
54 0
OpenIddict Server + MVC Client — Minimal Sample

Looking for an open-source way to implement 𝗦𝗦𝗢 in ASP.NET Core? This guide shows how to build a central authentication system using 𝗢𝗽𝗲𝗻𝗜𝗱𝗱𝗶𝗰𝘁, a free alternative to Duende Identity.

It includes:
  • A working AuthServer and MVC client
  • Login and consent pages
  • Proper handling of first-time login flows

Vahid Arya
75 0
dotnet cli cheat sheet

A cheat sheet for the .NET Command-Line Interface (CLI) provides a quick reference to common commands used for developing, building, running, and publishing .NET applications.

Vahid Arya
34 0
YARP: From Zero to Hero in .NET Reverse Proxy

YARP (Yet Another Reverse Proxy) is a highly customizable reverse proxy library for .NET. It's designed to provide a robust, flexible, scalable, secure, and easy to use proxy framework. YARP helps developers create powerful and efficient reverse proxy solutions tailored to their specific needs.

Vahid Arya
67 0
HybridCache Deep Dive

HybridCache in .NET is a caching mechanism introduced in .NET 9 that combines the benefits of both in-memory caching and distributed caching.It aims to provide a unified and efficient caching solution forASP.NETCore applications and other .NET projects.

Vahid Arya
34 0
Mastering Pattern Matching in C# – With Real Examples

Pattern matching is a technique where you test an expression to determine if it has certain characteristics. 
C# pattern matching provides more concise syntax for testing expressions and taking action when an expression matches. 
The "is" supports pattern matching to test an expression and conditionally declare a new variable to the result of that expression. 
The "switch" enables you to perform actions based on the first matching pattern for an expression. 
These two expressions support a rich vocabulary of patterns.

Vahid Arya
25 0
Rate limiting middleware in ASP.NET Core

The Microsoft.AspNetCore.RateLimiting middleware provides rate limiting middleware. Apps configure rate limiting policies and then attach the policies to endpoints.

Why use rate limiting
Rate limiting can be used for managing the flow of incoming requests to an app. Key reasons to implement rate limiting:

  • Preventing Abuse: Rate limiting helps protect an app from abuse by limiting the number of requests a user or client can make in a given time period. This is particularly important for public APIs.
  • Ensuring Fair Usage: By setting limits, all users have fair access to resources, preventing users from monopolizing the system.
  • Protecting Resources: Rate limiting helps prevent server overload by controlling the number of requests that can be processed, thus protecting the backend resources from being overwhelmed.
  • Enhancing Security: It can mitigate the risk of Denial of Service (DoS) attacks by limiting the rate at which requests are processed, making it harder for attackers to flood a system.
  • Improving Performance: By controlling the rate of incoming requests, optimal performance and responsiveness of an app can be maintained, ensuring a better user experience.
  • Cost Management: For services that incur costs based on usage, rate limiting can help manage and predict expenses by controlling the volume of requests processed.
Vahid Arya
66 4
Redis or Memcached or Sql Server as IDistributedCache in .NET

Memcached is a distributed, high-speed caching system that stores simple key-value pairs in memory. It’s ideal for quick, transient data storage without persistence or complex features.

Redis is a distributed, open-source, in-memory data store used as a cache, database, and message broker. It supports advanced data structures and features like persistence, replication, and clustering.

Yes, you can configure IDistributedCache in .NET to use either Redis or Memcached as the backend cache provider. This allows you to use the distributed caching infrastructure of .NET while leveraging the power of Redis or Memcached to store the data.

Vahid Arya
40 0
Stay in touch with us.

(+98)9192962583

info@redmask.ir

paint-brush
Follow Me

© vahid arya. All Rights Reserved.