using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AX.FireTrainingSys
{
///
/// 类型转换辅助类。
///
public static class ConverterHelper
{
///
/// DateTime 到 string 的类型转换。
///
///
public static ValueConverter DateTimeToStringConverter() => new ValueConverter(
v => v.ToString("yyyy-MM-dd HH:mm:ss"),
v => DateTime.SpecifyKind(DateTime.Parse(v), DateTimeKind.Utc));
}
}