diff --git a/Dysnomia.Common.SQL/DbNullHelper.cs b/Dysnomia.Common.SQL/DbNullHelper.cs
new file mode 100644
index 0000000..cc7cad2
--- /dev/null
+++ b/Dysnomia.Common.SQL/DbNullHelper.cs
@@ -0,0 +1,40 @@
+/*
+ MIT License
+
+ Copyright (c) 2020 Axel "Elanis" Soupé
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+*/
+using System;
+
+namespace Dysnomia.Common.SQL {
+ public static class DbNullHelper {
+ public static object DbNullOrString(this string val) {
+ if(string.IsNullOrEmpty(val)) {
+ return DBNull.Value;
+ }
+
+ return val;
+ }
+
+ public static object DbNullOrValue(this object val) {
+ return val ?? DBNull.Value;
+ }
+ }
+}
diff --git a/Dysnomia.Common.SQL/Dysnomia.Common.SQL.csproj b/Dysnomia.Common.SQL/Dysnomia.Common.SQL.csproj
index 4babe93..6f9744e 100644
--- a/Dysnomia.Common.SQL/Dysnomia.Common.SQL.csproj
+++ b/Dysnomia.Common.SQL/Dysnomia.Common.SQL.csproj
@@ -9,10 +9,10 @@
https://github.com/Dysnomia-Studio/Dysnomia.Common.SQL
https://github.com/Dysnomia-Studio/Dysnomia.Common.SQL
Github
- Fix DataTableHelper
- 1.1.1-rc2
- 1.1.1.1
- 1.1.1.1
+ Added DbNullHelper
+ 1.1.1-rc3
+ 1.1.1.2
+ 1.1.1.2
diff --git a/LICENSE b/LICENSE
index 31a2100..992ad74 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2019 Dysnomia
+Copyright (c) 2019-2020 Dysnomia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal