Kishan.Jsk.Utility 3.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Kishan.Jsk.Utility --version 3.1.1                
NuGet\Install-Package Kishan.Jsk.Utility -Version 3.1.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="Kishan.Jsk.Utility" Version="3.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kishan.Jsk.Utility --version 3.1.1                
#r "nuget: Kishan.Jsk.Utility, 3.1.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.
// Install Kishan.Jsk.Utility as a Cake Addin
#addin nuget:?package=Kishan.Jsk.Utility&version=3.1.1

// Install Kishan.Jsk.Utility as a Cake Tool
#tool nuget:?package=Kishan.Jsk.Utility&version=3.1.1                

This package is useful for the business logic to more secure and standardise the code. It's useful to test how our controller behaves based on the validity of the inputs and validate its response based on the result of the operation it performs.

APIDefaultResponseModel

Return different-different types of response

CommonHelper

Checking email

IPAddress validations

Return random Integer/Digit

Checking strings are null or empty

Compares two arrays

Encryption

Create Encrypt and decrypt to your string or JSON

EnumExtention

Convert List to Oject

HttpRequestExtensions

Provides extension methods

JsonSerializeDeserializer

Convert JSON String to Object and Object to JSON

Session Extensions

Extensions of Session

WebHelper

Gets whether the request is made with AJAX

Get IP address from HTTP context

Check whether current HTTP request is available

XMLSerializeDeSerialize

Serializes an object

De-serializes an XML file into an object list

Serializes and Deserializes datetime

Encode and decode your attributes

EmailSender

Send an email by sending email Configuration

You need to Just add configuration in your appSetting.json file

"EmailConfiguration": {
"From": "YOUR_EMAIL_ADDRESS",
"SmtpServer": "smtp.gmail.com",
"Port": PORT_NO,
"Username": "YOUR_EMAIL_ADDRESS",
"Password": "YOUR_EMAIL_PASSWORD"
}

In your starup.cs file

services.ConfigureEmail(Configuration.GetSection("EmailConfiguration").Get<EmailConfiguration>());

In your controller file

var message = new MimeMessage();
message.To.Add(new MailboxAddress(firstname,email));
message.Body = new TextPart("Plain") { Text = "Hello" };
try
{
     await _emailSender.SendEmailAsync(message);
}
catch (Exception ex)
{
     throw ex;
}

Dapper

Create CRUD Operation with Database using Connection String

You need to add Connection String in your appSetting.json file

"ConnectionStrings": {
"ServerConnectionString": "YOUR_CONNECTION_STRING"
}

In your starup.cs file

services.ConfigureDapper(Configuration.GetSection("ConnectionStrings").Get<ConnectionStrings>());

In your controller file

private readonly IRepositoryGeneric<Employees> _employeesRepo;

public EmployeesController(IRepositoryGeneric<Employees> employeesRepo)
{
     _employeesRepo = employeesRepo;
}

var getAllEmployee=_employeesRepo.GetAllAsync();

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
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
6.0.1 194 4/29/2023
5.0.1 165 4/29/2023
3.1.1 173 4/29/2023
2.1.1 179 4/29/2023
2.0.1 172 4/29/2023