MagnusMinds.Utility
9.0.13
dotnet add package MagnusMinds.Utility --version 9.0.13
NuGet\Install-Package MagnusMinds.Utility -Version 9.0.13
<PackageReference Include="MagnusMinds.Utility" Version="9.0.13" />
paket add MagnusMinds.Utility --version 9.0.13
#r "nuget: MagnusMinds.Utility, 9.0.13"
// Install MagnusMinds.Utility as a Cake Addin #addin nuget:?package=MagnusMinds.Utility&version=9.0.13 // Install MagnusMinds.Utility as a Cake Tool #tool nuget:?package=MagnusMinds.Utility&version=9.0.13
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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 is compatible. 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. net9.0 is compatible. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.1
- MailKit (>= 4.8.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0)
- MimeKit (>= 4.8.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.9.0)
-
.NETStandard 2.0
- MailKit (>= 4.8.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0)
- MimeKit (>= 4.8.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.9.0)
-
.NETStandard 2.1
- MailKit (>= 4.8.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0)
- MimeKit (>= 4.8.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.9.0)
-
net5.0
- MailKit (>= 4.8.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0)
- MimeKit (>= 4.8.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.9.0)
-
net6.0
- MailKit (>= 4.8.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0)
- MimeKit (>= 4.8.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.9.0)
-
net7.0
- MailKit (>= 4.8.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0)
- MimeKit (>= 4.8.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.9.0)
-
net8.0
- MailKit (>= 4.8.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0)
- MimeKit (>= 4.8.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.9.0)
-
net9.0
- MailKit (>= 4.8.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0)
- MimeKit (>= 4.8.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.9.0)
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 |
---|---|---|
9.0.13 | 67 | 11/13/2024 |
8.0.12 | 3,463 | 1/17/2024 |
7.0.12 | 121 | 1/17/2024 |
6.0.12 | 128 | 1/17/2024 |
6.0.11 | 2,554 | 6/26/2023 |
6.0.10 | 1,035 | 3/29/2023 |
6.0.8 | 220 | 3/16/2023 |
5.0.12 | 111 | 1/17/2024 |
5.0.11 | 147 | 6/26/2023 |
5.0.10 | 231 | 3/29/2023 |
5.0.8 | 227 | 3/16/2023 |
5.0.7 | 346 | 12/30/2022 |
5.0.6 | 943 | 4/29/2022 |
5.0.5 | 511 | 3/29/2022 |
5.0.3 | 569 | 2/25/2022 |
5.0.2 | 526 | 2/18/2022 |
5.0.1 | 584 | 2/4/2022 |
5.0.0 | 575 | 2/3/2022 |
3.1.12 | 114 | 1/17/2024 |
3.1.11 | 159 | 6/26/2023 |
3.1.10 | 196 | 3/29/2023 |
3.1.8 | 204 | 3/16/2023 |
3.1.7 | 266 | 12/30/2022 |
3.1.6 | 474 | 4/29/2022 |
3.1.4 | 527 | 3/29/2022 |
3.1.3 | 543 | 2/25/2022 |
3.1.2 | 549 | 2/24/2022 |
3.1.1 | 556 | 2/4/2022 |
3.1.0 | 563 | 2/3/2022 |
3.0.12 | 121 | 1/17/2024 |
3.0.11 | 147 | 6/26/2023 |
3.0.10 | 192 | 3/29/2023 |
3.0.8 | 229 | 3/16/2023 |
3.0.7 | 296 | 12/30/2022 |
3.0.6 | 477 | 4/29/2022 |
3.0.4 | 547 | 3/29/2022 |
3.0.3 | 527 | 2/25/2022 |
3.0.2 | 569 | 2/24/2022 |
3.0.1 | 573 | 2/4/2022 |
3.0.0 | 558 | 2/4/2022 |
2.1.12 | 114 | 1/17/2024 |
2.1.11 | 174 | 6/26/2023 |
2.1.10 | 197 | 3/29/2023 |
2.1.8 | 211 | 3/16/2023 |
2.1.7 | 272 | 12/30/2022 |
2.1.6 | 479 | 4/29/2022 |
2.1.5 | 509 | 3/29/2022 |
2.1.4 | 506 | 2/25/2022 |
2.1.3 | 520 | 2/24/2022 |
2.1.2 | 553 | 2/4/2022 |
2.1.0 | 581 | 2/4/2022 |
2.0.12 | 118 | 1/17/2024 |
2.0.11 | 132 | 6/26/2023 |
2.0.10 | 196 | 3/29/2023 |
2.0.8 | 208 | 3/16/2023 |
2.0.7 | 293 | 12/30/2022 |
2.0.6 | 411 | 4/29/2022 |
2.0.4 | 403 | 3/29/2022 |
2.0.3 | 418 | 2/25/2022 |
2.0.2 | 415 | 2/24/2022 |
2.0.1 | 433 | 2/4/2022 |
2.0.0 | 428 | 2/4/2022 |