MagnusMinds.Utility 5.0.2

.NET 5.0
There is a newer version of this package available.
See the version list below for details.
dotnet add package MagnusMinds.Utility --version 5.0.2
NuGet\Install-Package MagnusMinds.Utility -Version 5.0.2
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="5.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MagnusMinds.Utility --version 5.0.2
#r "nuget: MagnusMinds.Utility, 5.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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=5.0.2

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

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;
}

License

MIT

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
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
5.0.7 157 12/30/2022
5.0.6 727 4/29/2022
5.0.5 339 3/29/2022
5.0.3 377 2/25/2022
5.0.2 352 2/18/2022
5.0.1 400 2/4/2022
5.0.0 372 2/3/2022
3.1.7 94 12/30/2022
3.1.6 304 4/29/2022
3.1.4 332 3/29/2022
3.1.3 362 2/25/2022
3.1.2 370 2/24/2022
3.1.1 358 2/4/2022
3.1.0 368 2/3/2022
3.0.7 94 12/30/2022
3.0.6 299 4/29/2022
3.0.4 337 3/29/2022
3.0.3 335 2/25/2022
3.0.2 370 2/24/2022
3.0.1 376 2/4/2022
3.0.0 383 2/4/2022
2.1.7 94 12/30/2022
2.1.6 291 4/29/2022
2.1.5 335 3/29/2022
2.1.4 333 2/25/2022
2.1.3 340 2/24/2022
2.1.2 356 2/4/2022
2.1.0 381 2/4/2022
2.0.7 94 12/30/2022
2.0.6 236 4/29/2022
2.0.4 225 3/29/2022
2.0.3 233 2/25/2022
2.0.2 235 2/24/2022
2.0.1 245 2/4/2022
2.0.0 236 2/4/2022