/
dev-npgsql
/
npgsql
Обзор
Документация
Войти
/
dev-npgsql
/
npgsql
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
v8.0.7
src/Npgsql.NodaTime/NpgsqlNodaTimeExtensions.cs
21 строка
665 B
Nino Floris
Introduce resolver factories (#5374)
14 ноя 2023, 21:06
Не верифицирован
14 ноя 2023, 21:06
e8f20a0
Код
Авторство
О чём код?
using Npgsql.NodaTime.Internal; using Npgsql.TypeMapping; // ReSharper disable once CheckNamespace namespace Npgsql; /// <summary> /// Extension adding the NodaTime plugin to an Npgsql type mapper. /// </summary> public static class NpgsqlNodaTimeExtensions { /// <summary> /// Sets up NodaTime mappings for the PostgreSQL date/time types. /// </summary> /// <param name="mapper">The type mapper to set up (global or connection-specific)</param> public static INpgsqlTypeMapper UseNodaTime(this INpgsqlTypeMapper mapper) { mapper.AddTypeInfoResolverFactory(new NodaTimeTypeInfoResolverFactory()); return mapper; } }