Sube capa Infrastructure, Solution y archivos de configuracion del Backend

This commit is contained in:
FrancoRu
2026-09-18 13:36:47 -03:00
parent 2eb4eeef03
commit 1ef9a0bd03
205 changed files with 77651 additions and 0 deletions
@@ -0,0 +1,13 @@
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using System;
namespace Infrastructure.Persistance.Converters;
/// <summary>
/// Nullable variant of UtcDateTimeConverter.
/// </summary>
public class NullableUtcDateTimeConverter()
: ValueConverter<DateTime?, DateTime?>(
v => v.HasValue ? DateTime.SpecifyKind(v.Value, DateTimeKind.Unspecified) : null,
v => v.HasValue ? DateTime.SpecifyKind(v.Value, DateTimeKind.Utc) : null);
@@ -0,0 +1,13 @@
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using System;
namespace Infrastructure.Persistance.Converters;
/// <summary>
/// Converts DateTime values to Unspecified for storage and back to UTC on read, to satisfy the timestamp without time zone column type.
/// </summary>
public class UtcDateTimeConverter()
: ValueConverter<DateTime, DateTime>(
v => DateTime.SpecifyKind(v, DateTimeKind.Unspecified),
v => DateTime.SpecifyKind(v, DateTimeKind.Utc));