Изменения документа Сценарии

Редактировал(а) Alexandr Fokin 2024/12/07 13:48

<
От версии < 1.5 >
отредактировано Alexandr Fokin
на 2024/02/25 20:59
К версии < 1.17
отредактировано Alexandr Fokin
на 2024/12/07 13:48
Изменить комментарий: К данной версии нет комментариев

Комментарий

Подробности

Свойства страницы
Содержимое
... ... @@ -1,59 +1,23 @@
1 -|(% style="width:141px" %) |(% style="width:1372px" %)
2 -|(% style="width:141px" %)[[JSON>>doc:Разработка.Схемы данных, контракты, форматы.Text.JSON.WebHome]] тип данных|(% style="width:1372px" %)(((
3 -| |Can JSONB GIN indexes be specified in CodeFirst EntityFramework with NPGSQL?
4 -[[https:~~/~~/stackoverflow.com/questions/54618858/can-jsonb-gin-indexes-be-specified-in-codefirst-entityframework-with-npgsql>>https://stackoverflow.com/questions/54618858/can-jsonb-gin-indexes-be-specified-in-codefirst-entityframework-with-npgsql]]
5 -|Тип сущности|(((
6 -JSON Mapping
7 -[[https:~~/~~/www.npgsql.org/efcore/mapping/json.html?tabs=data-annotations%2Cpoco>>https://www.npgsql.org/efcore/mapping/json.html?tabs=data-annotations%2Cpoco]]
1 +----
8 8  
9 -[[System. Text. Json>>doc:Разработка.NET.Библиотеки.Документы.Форматы данных и схемы.NET Json.System\. Text\. Json.WebHome]]
10 -Позволяет использовать JsonDocument и JsonElement.
11 -)))
12 -|JsonDocument|1) Вызываем Dispose в setter для предыдущего значения.
13 -2) Делаем сущность Disposable и строим отчистку через Dispose DbContext.
14 -)))
15 -|(% style="width:141px" %)Parameters|(% style="width:1372px" %){{code language="c#"}}public static class QueryParameterExtensions
16 -{
17 - public static NpgsqlParameter StructToDbParameter<T>(
18 - this T value,
19 - string name,
20 - NpgsqlDbType type
21 - )
22 - where T : struct
23 - {
24 - return new NpgsqlParameter<T>(name, type) { TypedValue = value };
25 - }
3 +==== Внутренние ссылки: ====
26 26  
27 - public static NpgsqlParameter StructToDbParameter<T>(
28 - this T? value,
29 - string name,
30 - NpgsqlDbType type
31 - )
32 - where T : struct
33 - {
34 - if (!value.HasValue)
35 - {
36 - return new NpgsqlParameter(name, type) { Value = DBNull.Value };
37 - }
5 +====== Дочерние страницы: ======
38 38  
39 - return new NpgsqlParameter<T>(name, type) { TypedValue = value.Value };
40 - }
7 +{{children/}}
41 41  
42 - public static NpgsqlParameter ClassToDbParameter<T>(
43 - this T value,
44 - string name,
45 - NpgsqlDbType type
46 - )
47 - where T : class
48 - {
49 - if (value == null)
50 - {
51 - return new NpgsqlParameter(name, type) { Value = DBNull.Value };
52 - }
9 +====== Обратные ссылки: ======
53 53  
54 - return new NpgsqlParameter<T>(name, type) { TypedValue = value };
55 - }
56 -}{{/code}}
57 -|(% style="width:141px" %) |(% style="width:1372px" %)
11 +{{velocity}}
12 +#set ($links = $doc.getBacklinks())
13 +#if ($links.size() > 0)
14 + #foreach ($docname in $links)
15 + #set ($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
16 + * [[$escapetool.xml($rdoc.fullName)]]
17 + #end
18 +#else
19 + No back links for this page!
20 +#end
21 +{{/velocity}}
58 58  
59 -
23 +----