1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-30 01:02:21 -05:00
Justin Baur 1e0182008b
[PM-2943] Enable Nullable Repositories in Unowned Files (#4549)
* Enable Nullable In Unowned Repos

* Update More Tests

* Move to One If

* Fix Collections

* Format

* Add Migrations

* Move Pragma Annotation

* Add Better Assert Message
2024-07-24 09:48:09 -04:00

20 lines
430 B
C#

using System.Data;
using Dapper;
#nullable enable
namespace Bit.Infrastructure.Dapper.Repositories;
public class DateTimeHandler : SqlMapper.TypeHandler<DateTime>
{
public override void SetValue(IDbDataParameter parameter, DateTime value)
{
parameter.Value = value;
}
public override DateTime Parse(object value)
{
return DateTime.SpecifyKind((DateTime)value, DateTimeKind.Utc);
}
}