Add xml comments and DateTime datatype support for SQL

This commit is contained in:
Edgar Luque 2017-12-09 11:35:31 +01:00
parent 27ac4c6318
commit 6a6133f3f7
3 changed files with 233 additions and 16 deletions

View file

@ -23,6 +23,9 @@ using System.Diagnostics.CodeAnalysis;
namespace TShockAPI.DB
{
/// <summary>
/// Database extensions
/// </summary>
public static class DbExt
{
/// <summary>
@ -189,6 +192,10 @@ namespace TShockAPI.DB
typeof (double?),
(s, i) => s.IsDBNull(i) ? null : (object)s.GetDouble(i)
},
{
typeof (DateTime),
(s, i) => s.IsDBNull(i) ? null : (object)s.GetDateTime(i)
},
{
typeof (object),
(s, i) => s.GetValue(i)
@ -272,4 +279,4 @@ namespace TShockAPI.DB
return Reader.Get<T>(Reader.GetOrdinal(column));
}
}
}
}