Mizekar.Common
1.0.1
dotnet add package Mizekar.Common --version 1.0.1
NuGet\Install-Package Mizekar.Common -Version 1.0.1
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="Mizekar.Common" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mizekar.Common" Version="1.0.1" />
<PackageReference Include="Mizekar.Common" />
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 Mizekar.Common --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Mizekar.Common, 1.0.1"
#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 Mizekar.Common@1.0.1
#: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=Mizekar.Common&version=1.0.1
#tool nuget:?package=Mizekar.Common&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Mizekar.Common
کتابخانه مشترک برای تمام پروژههای بکاند Mizekar که شامل قابلیتهای مشترک مانند Logging، Swagger، Middleware، Exception Handling، Authentication، Permissions، Features و Helper classes میباشد.
ساختار پروژه
Mizekar.Common/
├── Authentication/ # Authentication services (ICurrentUser, ICurrentWorkSpace, RequireAdminAttribute)
├── Exceptions/ # Exception classes و Global Exception Handler
├── Extensions/ # Extension methods (DateTime, IQueryable, Strings, ServiceCollection)
├── Features/ # Feature management (IFeatureService, RequireFeatureAttribute)
├── Helpers/ # Helper classes (FinancialNumberToWords, FormulaEval, ExportFiles)
├── Logging/ # Logging configuration و Middleware
├── Middleware/ # Custom middleware (Culture, ModelValidation, UserAndWorkSpaceHeader)
├── Permissions/ # Permission management (IPermissionService, RequirePermissionAttribute)
├── Security/ # Security services (ISecurityService)
└── Swagger/ # Swagger configuration extensions
نحوه استفاده
1. اضافه کردن Reference
در فایل .csproj پروژه خود:
<ItemGroup>
<ProjectReference Include="..\..\mizekar-common\Mizekar.Common\Mizekar.Common.csproj" />
</ItemGroup>
2. استفاده در Program.cs
using Mizekar.Common.Logging;
using Mizekar.Common.Extensions;
using Mizekar.Common.Swagger;
var builder = WebApplication.CreateBuilder(args);
// Configure centralized logging
builder.Host.UseMizekarLogging("ServiceName");
// Add common services
builder.Services.AddMizekarCommonServices();
// Add Swagger
builder.Services.AddMizekarSwagger(
title: "API Title",
description: "API Description"
);
var app = builder.Build();
// Use Swagger
app.UseMizekarSwagger(routePrefix: "swagger");
// Use middleware
app.UseRequestHeaderLogging();
app.UseMiddleware<Mizekar.Common.Logging.RequestLoggingMiddleware>();
app.UseMiddleware<Mizekar.Common.Middleware.UserAndWorkSpaceHeaderMiddleware>();
app.UseCultureMiddleware();
app.UseExceptionHandler();
قابلیتها
Authentication
ICurrentUserوCurrentUser: مدیریت اطلاعات کاربر فعلیICurrentWorkSpaceوCurrentWorkSpace: مدیریت workspace فعلیRequireAdminAttribute: Attribute برای محدود کردن دسترسی به admin
Permissions
IPermissionService: سرویس برای بررسی permissions از headerX-PermissionsRequirePermissionAttribute: Attribute برای اعمال permission check
Features
IFeatureService: سرویس برای بررسی features و limits از headerX-FeaturesRequireFeatureAttribute: Attribute برای اعمال feature check
Security
ISecurityService: سرویس برای hash و GUID generation
Helpers
FinancialNumberToWords: تبدیل عدد به کلمات فارسیFormulaEval: ارزیابی فرمولهای ریاضی به صورت امنExportFiles: Export به Excel و PDF
Extensions
DateTimeExtensions: Parse تاریخ شمسی/میلادیDateTimeOffsetExtensions: تبدیل به زمان ایرانIQueryableExtensions: WhereIf و OrderBy2StringsExtensions: تبدیل اعداد فارسی/انگلیسی، GenerateCode، GenerateSlug
Dependencies
- Microsoft.AspNetCore.App
- Serilog.AspNetCore (8.0.1)
- Swashbuckle.AspNetCore (7.3.1)
- MiniExcelLibs (1.38.0)
- DynamicExpresso.Core (2.19.2)
License
Proprietary - Mizekar
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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.
-
net9.0
- DynamicExpresso.Core (>= 2.19.2)
- MiniExcel (>= 1.38.0)
- Serilog.AspNetCore (>= 8.0.1)
- Serilog.Enrichers.ExceptionProperties (>= 1.0.4)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.Debug (>= 2.0.0)
- Serilog.Sinks.Seq (>= 9.0.0)
- Swashbuckle.AspNetCore (>= 7.3.1)
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.1 | 126 | 1/29/2026 |
| 1.0.0.150 | 1,989 | 7/16/2019 |
| 1.0.0.148 | 1,771 | 7/13/2019 |
| 1.0.0.147 | 1,769 | 7/13/2019 |
| 1.0.0.146 | 1,826 | 7/12/2019 |
| 1.0.0.145 | 1,989 | 7/12/2019 |
| 1.0.0.144 | 1,741 | 7/11/2019 |
| 1.0.0.143 | 1,743 | 7/10/2019 |
| 1.0.0.140 | 1,730 | 7/6/2019 |
| 1.0.0.139 | 1,796 | 7/6/2019 |
| 1.0.0.138 | 1,835 | 7/2/2019 |
| 1.0.0.137 | 1,773 | 7/2/2019 |
| 1.0.0.136 | 1,842 | 6/29/2019 |
| 1.0.0.135 | 1,770 | 6/27/2019 |
| 1.0.0.131 | 1,766 | 6/24/2019 |
| 1.0.0.130 | 1,843 | 6/24/2019 |
| 1.0.0.129 | 1,819 | 6/24/2019 |
| 1.0.0.128 | 1,785 | 6/24/2019 |
| 1.0.0.127 | 1,822 | 6/22/2019 |
| 1.0.0.126 | 1,804 | 6/18/2019 |
| 1.0.0.125 | 1,847 | 6/17/2019 |
| 1.0.0.124 | 1,793 | 6/17/2019 |
| 1.0.0.123 | 1,800 | 6/16/2019 |
| 1.0.0.122 | 1,775 | 6/16/2019 |
| 1.0.0.121 | 1,806 | 6/16/2019 |
| 1.0.0.120 | 1,756 | 6/16/2019 |
| 1.0.0.119 | 1,856 | 6/15/2019 |
| 1.0.0.118 | 1,778 | 6/13/2019 |
| 1.0.0.107 | 1,806 | 5/31/2019 |
| 1.0.0.106 | 1,670 | 5/26/2019 |
| 1.0.0.105 | 1,792 | 5/26/2019 |
| 1.0.0.104 | 1,726 | 5/25/2019 |
| 1.0.0.103 | 1,847 | 5/25/2019 |
| 1.0.0.102 | 1,740 | 5/25/2019 |
| 1.0.0.101 | 1,823 | 5/25/2019 |
| 1.0.0.100 | 2,035 | 5/25/2019 |
| 1.0.0.99 | 1,901 | 5/24/2019 |
| 1.0.0.98 | 1,897 | 5/23/2019 |
| 1.0.0.97 | 1,794 | 5/23/2019 |
| 1.0.0.94 | 1,829 | 5/4/2019 |
| 1.0.0.84 | 1,818 | 4/22/2019 |
| 1.0.0.82 | 1,661 | 4/15/2019 |
| 1.0.0.81 | 1,924 | 3/10/2019 |
| 1.0.0.79 | 1,948 | 3/3/2019 |
| 1.0.0.78 | 1,632 | 3/2/2019 |
| 1.0.0.77 | 1,859 | 2/28/2019 |
| 1.0.0.76 | 1,833 | 2/28/2019 |
| 1.0.0.75 | 1,867 | 2/27/2019 |
| 1.0.0.74 | 1,878 | 2/27/2019 |
| 1.0.0.73 | 1,772 | 2/24/2019 |
| 1.0.0.72 | 1,954 | 2/17/2019 |
| 1.0.0.71 | 1,857 | 2/17/2019 |
| 1.0.0.70 | 1,940 | 2/12/2019 |
| 1.0.0.67 | 1,886 | 2/8/2019 |
| 1.0.0.65 | 1,947 | 2/8/2019 |
| 1.0.0.63 | 1,989 | 2/8/2019 |