MagnusMinds.Utility 3.1.3

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

// Install MagnusMinds.Utility as a Cake Tool
#tool nuget:?package=MagnusMinds.Utility&version=3.1.3

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
8.0.12 419 1/17/2024
7.0.12 79 1/17/2024
6.0.12 82 1/17/2024
6.0.11 2,490 6/26/2023
6.0.10 1,011 3/29/2023
6.0.8 192 3/16/2023
5.0.12 81 1/17/2024
5.0.11 113 6/26/2023
5.0.10 203 3/29/2023
5.0.8 203 3/16/2023
5.0.7 318 12/30/2022
5.0.6 906 4/29/2022
5.0.5 481 3/29/2022
5.0.3 537 2/25/2022
5.0.2 498 2/18/2022
5.0.1 551 2/4/2022
5.0.0 543 2/3/2022
3.1.12 83 1/17/2024
3.1.11 130 6/26/2023
3.1.10 167 3/29/2023
3.1.8 180 3/16/2023
3.1.7 240 12/30/2022
3.1.6 449 4/29/2022
3.1.4 500 3/29/2022
3.1.3 511 2/25/2022
3.1.2 521 2/24/2022
3.1.1 526 2/4/2022
3.1.0 531 2/3/2022
3.0.12 81 1/17/2024
3.0.11 120 6/26/2023
3.0.10 163 3/29/2023
3.0.8 194 3/16/2023
3.0.7 270 12/30/2022
3.0.6 449 4/29/2022
3.0.4 481 3/29/2022
3.0.3 483 2/25/2022
3.0.2 541 2/24/2022
3.0.1 534 2/4/2022
3.0.0 527 2/4/2022
2.1.12 81 1/17/2024
2.1.11 130 6/26/2023
2.1.10 167 3/29/2023
2.1.8 183 3/16/2023
2.1.7 245 12/30/2022
2.1.6 449 4/29/2022
2.1.5 483 3/29/2022
2.1.4 483 2/25/2022
2.1.3 497 2/24/2022
2.1.2 511 2/4/2022
2.1.0 547 2/4/2022
2.0.12 74 1/17/2024
2.0.11 106 6/26/2023
2.0.10 169 3/29/2023
2.0.8 185 3/16/2023
2.0.7 267 12/30/2022
2.0.6 385 4/29/2022
2.0.4 377 3/29/2022
2.0.3 390 2/25/2022
2.0.2 391 2/24/2022
2.0.1 403 2/4/2022
2.0.0 401 2/4/2022