-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy pathSqlServerStrings.Designer.cs
More file actions
1188 lines (1062 loc) · 70.1 KB
/
SqlServerStrings.Designer.cs
File metadata and controls
1188 lines (1062 loc) · 70.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// <auto-generated />
using System;
using System.Reflection;
using System.Resources;
using System.Threading;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Internal;
using Microsoft.Extensions.Logging;
#nullable enable
namespace Microsoft.EntityFrameworkCore.SqlServer.Internal
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
public static class SqlServerStrings
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.EntityFrameworkCore.SqlServer.Properties.SqlServerStrings", typeof(SqlServerStrings).Assembly);
/// <summary>
/// Engine type '{newEngineType}' cannot be configured, because engine type was already configured as '{oldEngineType}'.
/// </summary>
public static string AlreadyConfiguredEngineType(object? newEngineType, object? oldEngineType)
=> string.Format(
GetString("AlreadyConfiguredEngineType", nameof(newEngineType), nameof(oldEngineType)),
newEngineType, oldEngineType);
/// <summary>
/// To change the IDENTITY property of a column, the column needs to be dropped and recreated.
/// </summary>
public static string AlterIdentityColumn
=> GetString("AlterIdentityColumn");
/// <summary>
/// To change the memory-optimized setting on a table, the table needs to be dropped and recreated.
/// </summary>
public static string AlterMemoryOptimizedTable
=> GetString("AlterMemoryOptimizedTable");
/// <summary>
/// Cannot produce unterminated SQL with comments when generating migrations SQL for '{operation}'.
/// </summary>
public static string CannotProduceUnterminatedSQLWithComments(object? operation)
=> string.Format(
GetString("CannotProduceUnterminatedSQLWithComments", nameof(operation)),
operation);
/// <summary>
/// EF Core's SQL Server compatibility level is set to {compatibilityLevel}; compatibility level 130 (SQL Server 2016) is the minimum for most forms of querying of JSON arrays.
/// </summary>
public static string CompatibilityLevelTooLowForScalarCollections(object? compatibilityLevel)
=> string.Format(
GetString("CompatibilityLevelTooLowForScalarCollections", nameof(compatibilityLevel)),
compatibilityLevel);
/// <summary>
/// 'DateTimeOffset.Offset' cannot be translated on its own; use 'DateTimeOffset.Offset.TotalMinutes' to get the offset in minutes.
/// </summary>
public static string DateTimeOffsetOffsetRequiresTotalMinutes
=> GetString("DateTimeOffsetOffsetRequiresTotalMinutes");
/// <summary>
/// '{entityType1}.{property1}' and '{entityType2}.{property2}' are both mapped to column '{columnName}' in '{table}', but are configured with different identity increment values.
/// </summary>
public static string DuplicateColumnIdentityIncrementMismatch(object? entityType1, object? property1, object? entityType2, object? property2, object? columnName, object? table)
=> string.Format(
GetString("DuplicateColumnIdentityIncrementMismatch", nameof(entityType1), nameof(property1), nameof(entityType2), nameof(property2), nameof(columnName), nameof(table)),
entityType1, property1, entityType2, property2, columnName, table);
/// <summary>
/// '{entityType1}.{property1}' and '{entityType2}.{property2}' are both mapped to column '{columnName}' in '{table}', but are configured with different identity seed values.
/// </summary>
public static string DuplicateColumnIdentitySeedMismatch(object? entityType1, object? property1, object? entityType2, object? property2, object? columnName, object? table)
=> string.Format(
GetString("DuplicateColumnIdentitySeedMismatch", nameof(entityType1), nameof(property1), nameof(entityType2), nameof(property2), nameof(columnName), nameof(table)),
entityType1, property1, entityType2, property2, columnName, table);
/// <summary>
/// '{entityType1}.{property1}' and '{entityType2}.{property2}' are both mapped to column '{columnName}' in '{table}', but are configured with different value generation strategies.
/// </summary>
public static string DuplicateColumnNameValueGenerationStrategyMismatch(object? entityType1, object? property1, object? entityType2, object? property2, object? columnName, object? table)
=> string.Format(
GetString("DuplicateColumnNameValueGenerationStrategyMismatch", nameof(entityType1), nameof(property1), nameof(entityType2), nameof(property2), nameof(columnName), nameof(table)),
entityType1, property1, entityType2, property2, columnName, table);
/// <summary>
/// '{entityType1}.{property1}' and '{entityType2}.{property2}' are both mapped to column '{columnName}' in '{table}', but are configured with different hi-lo sequences.
/// </summary>
public static string DuplicateColumnSequenceMismatch(object? entityType1, object? property1, object? entityType2, object? property2, object? columnName, object? table)
=> string.Format(
GetString("DuplicateColumnSequenceMismatch", nameof(entityType1), nameof(property1), nameof(entityType2), nameof(property2), nameof(columnName), nameof(table)),
entityType1, property1, entityType2, property2, columnName, table);
/// <summary>
/// '{entityType1}.{property1}' and '{entityType2}.{property2}' are both mapped to column '{columnName}' in '{table}', but are configured with different sparseness.
/// </summary>
public static string DuplicateColumnSparsenessMismatch(object? entityType1, object? property1, object? entityType2, object? property2, object? columnName, object? table)
=> string.Format(
GetString("DuplicateColumnSparsenessMismatch", nameof(entityType1), nameof(property1), nameof(entityType2), nameof(property2), nameof(columnName), nameof(table)),
entityType1, property1, entityType2, property2, columnName, table);
/// <summary>
/// The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different clustered configurations.
/// </summary>
public static string DuplicateIndexClusteredMismatch(object? index1, object? entityType1, object? index2, object? entityType2, object? table, object? indexName)
=> string.Format(
GetString("DuplicateIndexClusteredMismatch", nameof(index1), nameof(entityType1), nameof(index2), nameof(entityType2), nameof(table), nameof(indexName)),
index1, entityType1, index2, entityType2, table, indexName);
/// <summary>
/// The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different data compression configurations.
/// </summary>
public static string DuplicateIndexDataCompressionMismatch(object? index1, object? entityType1, object? index2, object? entityType2, object? table, object? indexName)
=> string.Format(
GetString("DuplicateIndexDataCompressionMismatch", nameof(index1), nameof(entityType1), nameof(index2), nameof(entityType2), nameof(table), nameof(indexName)),
index1, entityType1, index2, entityType2, table, indexName);
/// <summary>
/// The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different fill factor configurations.
/// </summary>
public static string DuplicateIndexFillFactorMismatch(object? index1, object? entityType1, object? index2, object? entityType2, object? table, object? indexName)
=> string.Format(
GetString("DuplicateIndexFillFactorMismatch", nameof(index1), nameof(entityType1), nameof(index2), nameof(entityType2), nameof(table), nameof(indexName)),
index1, entityType1, index2, entityType2, table, indexName);
/// <summary>
/// The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different included columns: {includedColumns1} and {includedColumns2}.
/// </summary>
public static string DuplicateIndexIncludedMismatch(object? index1, object? entityType1, object? index2, object? entityType2, object? table, object? indexName, object? includedColumns1, object? includedColumns2)
=> string.Format(
GetString("DuplicateIndexIncludedMismatch", nameof(index1), nameof(entityType1), nameof(index2), nameof(entityType2), nameof(table), nameof(indexName), nameof(includedColumns1), nameof(includedColumns2)),
index1, entityType1, index2, entityType2, table, indexName, includedColumns1, includedColumns2);
/// <summary>
/// The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different online configurations.
/// </summary>
public static string DuplicateIndexOnlineMismatch(object? index1, object? entityType1, object? index2, object? entityType2, object? table, object? indexName)
=> string.Format(
GetString("DuplicateIndexOnlineMismatch", nameof(index1), nameof(entityType1), nameof(index2), nameof(entityType2), nameof(table), nameof(indexName)),
index1, entityType1, index2, entityType2, table, indexName);
/// <summary>
/// The indexes {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{indexName}', but have different sort in tempdb configurations.
/// </summary>
public static string DuplicateIndexSortInTempDbMismatch(object? index1, object? entityType1, object? index2, object? entityType2, object? table, object? indexName)
=> string.Format(
GetString("DuplicateIndexSortInTempDbMismatch", nameof(index1), nameof(entityType1), nameof(index2), nameof(entityType2), nameof(table), nameof(indexName)),
index1, entityType1, index2, entityType2, table, indexName);
/// <summary>
/// The keys {key1} on '{entityType1}' and {key2} on '{entityType2}' are both mapped to '{table}.{keyName}', but have different clustering configurations.
/// </summary>
public static string DuplicateKeyMismatchedClustering(object? key1, object? entityType1, object? key2, object? entityType2, object? table, object? keyName)
=> string.Format(
GetString("DuplicateKeyMismatchedClustering", nameof(key1), nameof(entityType1), nameof(key2), nameof(entityType2), nameof(table), nameof(keyName)),
key1, entityType1, key2, entityType2, table, keyName);
/// <summary>
/// 'ExecuteUpdate' cannot set a property in a JSON column to an expression containing a column on SQL Server versions before 2022. If you're on SQL Server 2022 and above, your compatibility level may be set to a lower value; consider raising it.
/// </summary>
public static string ExecuteUpdateCannotSetJsonPropertyOnOldSqlServer
=> GetString("ExecuteUpdateCannotSetJsonPropertyOnOldSqlServer");
/// <summary>
/// Entity type '{entityType}' has multiple full-text indexes configured. SQL Server supports only one full-text index per table.
/// </summary>
public static string FullTextIndexDuplicateOnTable(object? entityType)
=> string.Format(
GetString("FullTextIndexDuplicateOnTable", nameof(entityType)),
entityType);
/// <summary>
/// Full-text index '{index}' on entity type '{entityType}' specifies a language for property '{property}', but that property is not part of the index.
/// </summary>
public static string FullTextIndexLanguagePropertyNotInIndex(object? index, object? entityType, object? property)
=> string.Format(
GetString("FullTextIndexLanguagePropertyNotInIndex", nameof(index), nameof(entityType), nameof(property)),
index, entityType, property);
/// <summary>
/// Full-text index '{index}' on entity type '{entityType}' does not have a KEY INDEX configured. SQL Server requires a KEY INDEX for every full-text index. Use 'UseKeyIndex' to configure the KEY INDEX.
/// </summary>
public static string FullTextIndexMissingKeyIndex(object? index, object? entityType)
=> string.Format(
GetString("FullTextIndexMissingKeyIndex", nameof(index), nameof(entityType)),
index, entityType);
/// <summary>
/// Full-text index '{index}' on entity type '{entityType}' includes property '{property}' which is not mapped to a text or varbinary column type supported by full-text search.
/// </summary>
public static string FullTextIndexOnInvalidColumn(object? index, object? entityType, object? property)
=> string.Format(
GetString("FullTextIndexOnInvalidColumn", nameof(index), nameof(entityType), nameof(property)),
index, entityType, property);
/// <summary>
/// Multiple full-text catalogs are marked as default. Only one full-text catalog can be the default.
/// </summary>
public static string FullTextMultipleDefaultCatalogs
=> GetString("FullTextMultipleDefaultCatalogs");
/// <summary>
/// Identity value generation cannot be used for the property '{property}' on entity type '{entityType}' because the property type is '{propertyType}'. Identity value generation can only be used with signed integer properties.
/// </summary>
public static string IdentityBadType(object? property, object? entityType, object? propertyType)
=> string.Format(
GetString("IdentityBadType", nameof(property), nameof(entityType), nameof(propertyType)),
property, entityType, propertyType);
/// <summary>
/// The include property '{entityType}.{property}' was specified multiple times for the index {index}.
/// </summary>
public static string IncludePropertyDuplicated(object? entityType, object? property, object? index)
=> string.Format(
GetString("IncludePropertyDuplicated", nameof(entityType), nameof(property), nameof(index)),
entityType, property, index);
/// <summary>
/// The include property '{entityType}.{property}' is already part of the index {index}.
/// </summary>
public static string IncludePropertyInIndex(object? entityType, object? property, object? index)
=> string.Format(
GetString("IncludePropertyInIndex", nameof(entityType), nameof(property), nameof(index)),
entityType, property, index);
/// <summary>
/// The include property '{property}' specified on the index {index} was not found on entity type '{entityType}'.
/// </summary>
public static string IncludePropertyNotFound(object? property, object? index, object? entityType)
=> string.Format(
GetString("IncludePropertyNotFound", nameof(property), nameof(index), nameof(entityType)),
property, index, entityType);
/// <summary>
/// Cannot use table '{table}' for entity type '{entityType}' since it is being used for entity type '{otherEntityType}' and entity type '{entityTypeWithSqlOutputClause}' is configured to use the SQL OUTPUT clause, but entity type '{entityTypeWithoutSqlOutputClause}' is not.
/// </summary>
public static string IncompatibleSqlOutputClauseMismatch(object? table, object? entityType, object? otherEntityType, object? entityTypeWithSqlOutputClause, object? entityTypeWithoutSqlOutputClause)
=> string.Format(
GetString("IncompatibleSqlOutputClauseMismatch", nameof(table), nameof(entityType), nameof(otherEntityType), nameof(entityTypeWithSqlOutputClause), nameof(entityTypeWithoutSqlOutputClause)),
table, entityType, otherEntityType, entityTypeWithSqlOutputClause, entityTypeWithoutSqlOutputClause);
/// <summary>
/// Cannot use table '{table}' for entity type '{entityType}' since it is being used for entity type '{otherEntityType}' and entity type '{memoryOptimizedEntityType}' is marked as memory-optimized, but entity type '{nonMemoryOptimizedEntityType}' is not.
/// </summary>
public static string IncompatibleTableMemoryOptimizedMismatch(object? table, object? entityType, object? otherEntityType, object? memoryOptimizedEntityType, object? nonMemoryOptimizedEntityType)
=> string.Format(
GetString("IncompatibleTableMemoryOptimizedMismatch", nameof(table), nameof(entityType), nameof(otherEntityType), nameof(memoryOptimizedEntityType), nameof(nonMemoryOptimizedEntityType)),
table, entityType, otherEntityType, memoryOptimizedEntityType, nonMemoryOptimizedEntityType);
/// <summary>
/// SQL Server requires the table name to be specified for index operations. Specify table name in calls to 'MigrationBuilder.RenameIndex' and 'DropIndex'.
/// </summary>
public static string IndexTableRequired
=> GetString("IndexTableRequired");
/// <summary>
/// Collation name '{collation}' is invalid; collation names may only contain alphanumeric characters and underscores.
/// </summary>
public static string InvalidCollationName(object? collation)
=> string.Format(
GetString("InvalidCollationName", nameof(collation)),
collation);
/// <summary>
/// The datepart '{datepart}' is invalid for the {function} function; datepart values may only contain letters and underscores.
/// </summary>
public static string InvalidDatePart(object? datepart, object? function)
=> string.Format(
GetString("InvalidDatePart", nameof(datepart), nameof(function)),
datepart, function);
/// <summary>
/// The expression passed to the 'propertyReference' parameter of the 'FreeText' method is not a valid reference to a property. The expression must represent a reference to a full-text indexed property on the object referenced in the from clause: 'from e in context.Entities where EF.Functions.FreeText(e.SomeProperty, textToSearchFor) select e'
/// </summary>
public static string InvalidColumnNameForFreeText
=> GetString("InvalidColumnNameForFreeText");
/// <summary>
/// Engine type was not configured. Use one of {methods} to configure it.
/// </summary>
public static string InvalidEngineType(object? methods)
=> string.Format(
GetString("InvalidEngineType", nameof(methods)),
methods);
/// <summary>
/// The specified table '{table}' is not in a valid format. Specify tables using the format '[schema].[table]'.
/// </summary>
public static string InvalidTableToIncludeInScaffolding(object? table)
=> string.Format(
GetString("InvalidTableToIncludeInScaffolding", nameof(table)),
table);
/// <summary>
/// A non-constant array index or property name was used when navigating inside a JSON document, but EF Core's SQL Server compatibility level is set to {compatibilityLevel}; this is only supported with compatibility level 140 (SQL Server 2017) or higher.
/// </summary>
public static string JsonValuePathExpressionsNotSupported(object? compatibilityLevel)
=> string.Format(
GetString("JsonValuePathExpressionsNotSupported", nameof(compatibilityLevel)),
compatibilityLevel);
/// <summary>
/// This usage of Math.Min or Math.Max requires SQL Server functions LEAST and GREATEST, which require compatibility level 160.
/// </summary>
public static string LeastGreatestCompatibilityLevelTooLow
=> GetString("LeastGreatestCompatibilityLevelTooLow");
/// <summary>
/// The properties {properties} are configured to use 'Identity' value generation and are mapped to the same table '{table}', but only one column per table can be configured as 'Identity'. Call 'ValueGeneratedNever' in 'OnModelCreating' for properties that should not use 'Identity'.
/// </summary>
public static string MultipleIdentityColumns(object? properties, object? table)
=> string.Format(
GetString("MultipleIdentityColumns", nameof(properties), nameof(table)),
properties, table);
/// <summary>
/// The database name could not be determined. To use 'EnsureDeleted', the connection string must specify 'Initial Catalog'.
/// </summary>
public static string NoInitialCatalog
=> GetString("NoInitialCatalog");
/// <summary>
/// SQL Server does not support releasing a savepoint.
/// </summary>
public static string NoSavepointRelease
=> GetString("NoSavepointRelease");
/// <summary>
/// The '{propertyType}' property '{entityType}.{property}' could not be mapped because the required HierarchyId services have not been configured. Install the 'Microsoft.EntityFrameworkCore.SqlServer.HierarchyId' NuGet package and call 'UseHierarchyId' in your SQL Server provider configuration. See https://learn.microsoft.com/ef/core/providers/sql-server/hierarchyid for more information.
/// </summary>
public static string PropertyNotMappedHierarchyId(object? propertyType, object? entityType, object? property)
=> string.Format(
GetString("PropertyNotMappedHierarchyId", nameof(propertyType), nameof(entityType), nameof(property)),
propertyType, entityType, property);
/// <summary>
/// The query is attempting to query a JSON collection of binary data in a context that requires preserving the ordering of the collection; this isn't supported by SQL Server.
/// </summary>
public static string QueryingOrderedBinaryJsonCollectionsNotSupported
=> GetString("QueryingOrderedBinaryJsonCollectionsNotSupported");
/// <summary>
/// Could not save changes because the target table has computed column with a function that performs data access. Please configure your table accordingly, see https://aka.ms/efcore-docs-sqlserver-save-changes-and-output-clause for more information.
/// </summary>
public static string SaveChangesFailedBecauseOfComputedColumnWithFunction
=> GetString("SaveChangesFailedBecauseOfComputedColumnWithFunction");
/// <summary>
/// Could not save changes because the target table has database triggers. Please configure your table accordingly, see https://aka.ms/efcore-docs-sqlserver-save-changes-and-output-clause for more information.
/// </summary>
public static string SaveChangesFailedBecauseOfTriggers
=> GetString("SaveChangesFailedBecauseOfTriggers");
/// <summary>
/// SQL Server sequences cannot be used to generate values for the property '{property}' on entity type '{entityType}' because the property type is '{propertyType}'. Sequences can only be used with integer properties.
/// </summary>
public static string SequenceBadType(object? property, object? entityType, object? propertyType)
=> string.Format(
GetString("SequenceBadType", nameof(property), nameof(entityType), nameof(propertyType)),
property, entityType, propertyType);
/// <summary>
/// Entity type '{entityType}' should be marked as temporal because it shares table mapping with another entity that has been marked as temporal. Alternatively, other entity types that share the same table must be non-temporal.
/// </summary>
public static string TemporalAllEntitiesMappedToSameTableMustBeTemporal(object? entityType)
=> string.Format(
GetString("TemporalAllEntitiesMappedToSameTableMustBeTemporal", nameof(entityType)),
entityType);
/// <summary>
/// Entity type '{entityType}' mapped to temporal table does not contain the expected period property: '{propertyName}'.
/// </summary>
public static string TemporalExpectedPeriodPropertyNotFound(object? entityType, object? propertyName)
=> string.Format(
GetString("TemporalExpectedPeriodPropertyNotFound", nameof(entityType), nameof(propertyName)),
entityType, propertyName);
/// <summary>
/// Modifying SQL of a computed column '{columnName}' on a temporal table '{tableName}' is not supported by migrations.
/// </summary>
public static string TemporalMigrationModifyingComputedColumnNotSupported(object? columnName, object? tableName)
=> string.Format(
GetString("TemporalMigrationModifyingComputedColumnNotSupported", nameof(columnName), nameof(tableName)),
columnName, tableName);
/// <summary>
/// Entity type '{entityType}' mapped to temporal table must have a period start and a period end property.
/// </summary>
public static string TemporalMustDefinePeriodProperties(object? entityType)
=> string.Format(
GetString("TemporalMustDefinePeriodProperties", nameof(entityType)),
entityType);
/// <summary>
/// Temporal query is trying to use navigation to an entity '{entityType}' which itself doesn't map to temporal table. Either map the entity to temporal table or use join manually to access it.
/// </summary>
public static string TemporalNavigationExpansionBetweenTemporalAndNonTemporal(object? entityType)
=> string.Format(
GetString("TemporalNavigationExpansionBetweenTemporalAndNonTemporal", nameof(entityType)),
entityType);
/// <summary>
/// Navigation expansion is only supported for '{operationName}' temporal operation. For other operations use join manually.
/// </summary>
public static string TemporalNavigationExpansionOnlySupportedForAsOf(object? operationName)
=> string.Format(
GetString("TemporalNavigationExpansionOnlySupportedForAsOf", nameof(operationName)),
operationName);
/// <summary>
/// When multiple temporal entities are mapped to the same table, their period {periodType} properties must map to the same column. Issue happens for entity type '{entityType}' with period property '{periodProperty}' which is mapped to column '{periodColumn}'. Expected period column name is '{expectedColumnName}'.
/// </summary>
public static string TemporalNotSupportedForTableSplittingWithInconsistentPeriodMapping(object? periodType, object? entityType, object? periodProperty, object? periodColumn, object? expectedColumnName)
=> string.Format(
GetString("TemporalNotSupportedForTableSplittingWithInconsistentPeriodMapping", nameof(periodType), nameof(entityType), nameof(periodProperty), nameof(periodColumn), nameof(expectedColumnName)),
periodType, entityType, periodProperty, periodColumn, expectedColumnName);
/// <summary>
/// Only root entity type should be marked as temporal. Entity type: '{entityType}'.
/// </summary>
public static string TemporalOnlyOnRoot(object? entityType)
=> string.Format(
GetString("TemporalOnlyOnRoot", nameof(entityType)),
entityType);
/// <summary>
/// Temporal tables are only supported for entities using Table-Per-Hierarchy inheritance mapping. Entity type: '{entityType}'.
/// </summary>
public static string TemporalOnlySupportedForTPH(object? entityType)
=> string.Format(
GetString("TemporalOnlySupportedForTPH", nameof(entityType)),
entityType);
/// <summary>
/// Period property '{entityType}.{propertyName}' can't have a default value specified.
/// </summary>
public static string TemporalPeriodPropertyCantHaveDefaultValue(object? entityType, object? propertyName)
=> string.Format(
GetString("TemporalPeriodPropertyCantHaveDefaultValue", nameof(entityType), nameof(propertyName)),
entityType, propertyName);
/// <summary>
/// Period property '{entityType}.{propertyName}' must be a shadow property.
/// </summary>
public static string TemporalPeriodPropertyMustBeInShadowState(object? entityType, object? propertyName)
=> string.Format(
GetString("TemporalPeriodPropertyMustBeInShadowState", nameof(entityType), nameof(propertyName)),
entityType, propertyName);
/// <summary>
/// Period property '{entityType}.{propertyName}' must be mapped to a column of type '{columnType}'.
/// </summary>
public static string TemporalPeriodPropertyMustBeMappedToDatetime2(object? entityType, object? propertyName, object? columnType)
=> string.Format(
GetString("TemporalPeriodPropertyMustBeMappedToDatetime2", nameof(entityType), nameof(propertyName), nameof(columnType)),
entityType, propertyName, columnType);
/// <summary>
/// Period property '{entityType}.{propertyName}' must be non-nullable and of type '{dateTimeType}'.
/// </summary>
public static string TemporalPeriodPropertyMustBeNonNullableDateTime(object? entityType, object? propertyName, object? dateTimeType)
=> string.Format(
GetString("TemporalPeriodPropertyMustBeNonNullableDateTime", nameof(entityType), nameof(propertyName), nameof(dateTimeType)),
entityType, propertyName, dateTimeType);
/// <summary>
/// Property '{entityType}.{propertyName}' is mapped to the period column and must have ValueGenerated set to '{valueGeneratedValue}'.
/// </summary>
public static string TemporalPropertyMappedToPeriodColumnMustBeValueGeneratedOnAddOrUpdate(object? entityType, object? propertyName, object? valueGeneratedValue)
=> string.Format(
GetString("TemporalPropertyMappedToPeriodColumnMustBeValueGeneratedOnAddOrUpdate", nameof(entityType), nameof(propertyName), nameof(valueGeneratedValue)),
entityType, propertyName, valueGeneratedValue);
/// <summary>
/// Set operation can't be applied on entity '{entityType}' because temporal operations on both arguments don't match.
/// </summary>
public static string TemporalSetOperationOnMismatchedSources(object? entityType)
=> string.Format(
GetString("TemporalSetOperationOnMismatchedSources", nameof(entityType)),
entityType);
/// <summary>
/// SQL Server time zone offsets must be specified in whole minutes. The provided TimeSpan value contains sub-minute precision (seconds, milliseconds, or smaller), which is not supported.
/// </summary>
public static string TimeSpanOffsetPrecisionNotSupported
=> GetString("TimeSpanOffsetPrecisionNotSupported");
/// <summary>
/// The provided time zone offset '{offset}' is outside the valid range for SQL Server. Time zone offsets must be between -14:00 and +14:00.
/// </summary>
public static string TimeSpanOffsetOutOfRange(object? offset)
=> string.Format(
GetString("TimeSpanOffsetOutOfRange", nameof(offset)),
offset);
/// <summary>
/// An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call.
/// </summary>
public static string TransientExceptionDetected
=> GetString("TransientExceptionDetected");
/// <summary>
/// Vector properties require a positive size (number of dimensions).
/// </summary>
public static string VectorDimensionsInvalid
=> GetString("VectorDimensionsInvalid");
/// <summary>
/// Vector property '{structuralType}.{propertyName}' was not configured with the number of dimensions. Set the column type to 'vector(x)' with the desired number of dimensions, or use the 'MaxLength' APIs.
/// </summary>
public static string VectorDimensionsMissing(object? structuralType, object? propertyName)
=> string.Format(
GetString("VectorDimensionsMissing", nameof(structuralType), nameof(propertyName)),
structuralType, propertyName);
/// <summary>
/// Vector index '{index}' on entity type '{entityType}' is defined over property '{property}', which is not a vector property.
/// </summary>
public static string VectorIndexOnNonVectorProperty(object? index, object? entityType, object? property)
=> string.Format(
GetString("VectorIndexOnNonVectorProperty", nameof(index), nameof(entityType), nameof(property)),
index, entityType, property);
/// <summary>
/// Vector index '{index}' on entity type '{entityType}' must specify a similarity metric. Call 'HasMetric' on the vector index builder.
/// </summary>
public static string VectorIndexRequiresMetric(object? index, object? entityType)
=> string.Format(
GetString("VectorIndexRequiresMetric", nameof(index), nameof(entityType)),
index, entityType);
/// <summary>
/// Vector index '{index}' on entity type '{entityType}' must have exactly one property. Vector indexes do not support multiple properties.
/// </summary>
public static string VectorIndexRequiresSingleProperty(object? index, object? entityType)
=> string.Format(
GetString("VectorIndexRequiresSingleProperty", nameof(index), nameof(entityType)),
index, entityType);
/// <summary>
/// Vector index '{index}' on entity type '{entityType}' cannot have an empty vector index type.
/// </summary>
public static string VectorIndexRequiresType(object? index, object? entityType)
=> string.Format(
GetString("VectorIndexRequiresType", nameof(index), nameof(entityType)),
index, entityType);
/// <summary>
/// Vector property '{propertyName}' is on '{structuralType}' which is mapped to JSON. Vector properties are not supported within JSON documents.
/// </summary>
public static string VectorPropertiesNotSupportedInJson(object? propertyName, object? structuralType)
=> string.Format(
GetString("VectorPropertiesNotSupportedInJson", nameof(propertyName), nameof(structuralType)),
propertyName, structuralType);
/// <summary>
/// VectorSearch() requires a valid vector column.
/// </summary>
public static string VectorSearchRequiresColumn
=> GetString("VectorSearchRequiresColumn");
private static string GetString(string name, params string[] formatterNames)
{
var value = _resourceManager.GetString(name)!;
for (var i = 0; i < formatterNames.Length; i++)
{
value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
}
return value;
}
}
}
namespace Microsoft.EntityFrameworkCore.SqlServer.Internal
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
public static class SqlServerResources
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.EntityFrameworkCore.SqlServer.Properties.SqlServerStrings", typeof(SqlServerResources).Assembly);
/// <summary>
/// The property '{property}' on entity type '{entityType}' is of type 'byte', but is set up to use a SQL Server identity column; this requires that values starting at 255 and counting down will be used for temporary key values. A temporary key value is needed for every entity inserted in a single call to 'SaveChanges'. Care must be taken that these values do not collide with real key values.
/// </summary>
public static EventDefinition<string, string> LogByteIdentityColumn(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogByteIdentityColumn;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogByteIdentityColumn,
logger,
static logger => new EventDefinition<string, string>(
logger.Options,
SqlServerEventId.ByteIdentityColumnWarning,
LogLevel.Warning,
"SqlServerEventId.ByteIdentityColumnWarning",
level => LoggerMessage.Define<string, string>(
level,
SqlServerEventId.ByteIdentityColumnWarning,
_resourceManager.GetString("LogByteIdentityColumn")!)));
}
return (EventDefinition<string, string>)definition;
}
/// <summary>
/// A database type for column '{columnName}' on table '{tableName}' could not be found, the column will be skipped.
/// </summary>
public static EventDefinition<string, string> LogColumnWithoutType(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogColumnWithoutType;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogColumnWithoutType,
logger,
static logger => new EventDefinition<string, string>(
logger.Options,
SqlServerEventId.ColumnWithoutTypeWarning,
LogLevel.Warning,
"SqlServerEventId.ColumnWithoutTypeWarning",
level => LoggerMessage.Define<string, string>(
level,
SqlServerEventId.ColumnWithoutTypeWarning,
_resourceManager.GetString("LogColumnWithoutType")!)));
}
return (EventDefinition<string, string>)definition;
}
/// <summary>
/// Both the SqlServerValueGenerationStrategy '{generationStrategy}' and '{otherGenerationStrategy}' have been set on property '{propertyName}' on entity type '{entityName}'. Configuring two strategies is usually unintentional and will likely result in a database error.
/// </summary>
public static EventDefinition<string, string, string, string> LogConflictingValueGenerationStrategies(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogConflictingValueGenerationStrategies;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogConflictingValueGenerationStrategies,
logger,
static logger => new EventDefinition<string, string, string, string>(
logger.Options,
SqlServerEventId.ConflictingValueGenerationStrategiesWarning,
LogLevel.Warning,
"SqlServerEventId.ConflictingValueGenerationStrategiesWarning",
level => LoggerMessage.Define<string, string, string, string>(
level,
SqlServerEventId.ConflictingValueGenerationStrategiesWarning,
_resourceManager.GetString("LogConflictingValueGenerationStrategies")!)));
}
return (EventDefinition<string, string, string, string>)definition;
}
/// <summary>
/// Skipping foreign key '{foreignKeyName}' on table '{tableName}' since it is not supported by the Dataverse TDS Endpoint.
/// </summary>
public static EventDefinition<string, string> LogDataverseForeignKeyInvalid(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogDataverseForeignKeyInvalid;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogDataverseForeignKeyInvalid,
logger,
static logger => new EventDefinition<string, string>(
logger.Options,
SqlServerEventId.DataverseForeignKeyInvalidWarning,
LogLevel.Warning,
"SqlServerEventId.DataverseForeignKeyInvalidWarning",
level => LoggerMessage.Define<string, string>(
level,
SqlServerEventId.DataverseForeignKeyInvalidWarning,
_resourceManager.GetString("LogDataverseForeignKeyInvalid")!)));
}
return (EventDefinition<string, string>)definition;
}
/// <summary>
/// The decimal property '{property}' is part of a key on entity type '{entityType}'. If the configured precision and scale don't match the column type in the database, this will cause values to be silently truncated if they do not fit in the default precision and scale. Consider using a different property as the key, or make sure that the database column type matches the model configuration and enable decimal rounding warnings using 'SET NUMERIC_ROUNDABORT ON'.
/// </summary>
public static EventDefinition<string, string> LogDecimalTypeKey(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogDecimalTypeKey;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogDecimalTypeKey,
logger,
static logger => new EventDefinition<string, string>(
logger.Options,
SqlServerEventId.DecimalTypeKeyWarning,
LogLevel.Warning,
"SqlServerEventId.DecimalTypeKeyWarning",
level => LoggerMessage.Define<string, string>(
level,
SqlServerEventId.DecimalTypeKeyWarning,
_resourceManager.GetString("LogDecimalTypeKey")!)));
}
return (EventDefinition<string, string>)definition;
}
/// <summary>
/// No store type was specified for the decimal property '{property}' on entity type '{entityType}'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
/// </summary>
public static EventDefinition<string, string> LogDefaultDecimalTypeColumn(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogDefaultDecimalTypeColumn;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogDefaultDecimalTypeColumn,
logger,
static logger => new EventDefinition<string, string>(
logger.Options,
SqlServerEventId.DecimalTypeDefaultWarning,
LogLevel.Warning,
"SqlServerEventId.DecimalTypeDefaultWarning",
level => LoggerMessage.Define<string, string>(
level,
SqlServerEventId.DecimalTypeDefaultWarning,
_resourceManager.GetString("LogDefaultDecimalTypeColumn")!)));
}
return (EventDefinition<string, string>)definition;
}
/// <summary>
/// Skipping foreign key '{foreignKeyName}' on table '{tableName}' since it is a duplicate of '{duplicateForeignKeyName}'.
/// </summary>
public static EventDefinition<string, string, string> LogDuplicateForeignKeyConstraintIgnored(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogDuplicateForeignKeyConstraintIgnored;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogDuplicateForeignKeyConstraintIgnored,
logger,
static logger => new EventDefinition<string, string, string>(
logger.Options,
SqlServerEventId.DuplicateForeignKeyConstraintIgnored,
LogLevel.Warning,
"SqlServerEventId.DuplicateForeignKeyConstraintIgnored",
level => LoggerMessage.Define<string, string, string>(
level,
SqlServerEventId.DuplicateForeignKeyConstraintIgnored,
_resourceManager.GetString("LogDuplicateForeignKeyConstraintIgnored")!)));
}
return (EventDefinition<string, string, string>)definition;
}
/// <summary>
/// Found column with table: {tableName}, column name: {columnName}, ordinal: {ordinal}, data type: {dataType}, maximum length: {maxLength}, precision: {precision}, scale: {scale}, nullable: {nullable}, identity: {identity}, default value: {defaultValue}, computed value: {computedValue}, computed value is stored: {stored}.
/// </summary>
public static FallbackEventDefinition LogFoundColumn(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundColumn;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundColumn,
logger,
static logger => new FallbackEventDefinition(
logger.Options,
SqlServerEventId.ColumnFound,
LogLevel.Debug,
"SqlServerEventId.ColumnFound",
_resourceManager.GetString("LogFoundColumn")!));
}
return (FallbackEventDefinition)definition;
}
/// <summary>
/// Found default schema '{defaultSchema}'.
/// </summary>
public static EventDefinition<string> LogFoundDefaultSchema(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundDefaultSchema;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundDefaultSchema,
logger,
static logger => new EventDefinition<string>(
logger.Options,
SqlServerEventId.DefaultSchemaFound,
LogLevel.Debug,
"SqlServerEventId.DefaultSchemaFound",
level => LoggerMessage.Define<string>(
level,
SqlServerEventId.DefaultSchemaFound,
_resourceManager.GetString("LogFoundDefaultSchema")!)));
}
return (EventDefinition<string>)definition;
}
/// <summary>
/// Found foreign key on table '{tableName}' with name '{foreignKeyName}', principal table '{principalTableName}', delete action {deleteAction}.
/// </summary>
public static EventDefinition<string, string, string, string> LogFoundForeignKey(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundForeignKey;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundForeignKey,
logger,
static logger => new EventDefinition<string, string, string, string>(
logger.Options,
SqlServerEventId.ForeignKeyFound,
LogLevel.Debug,
"SqlServerEventId.ForeignKeyFound",
level => LoggerMessage.Define<string, string, string, string>(
level,
SqlServerEventId.ForeignKeyFound,
_resourceManager.GetString("LogFoundForeignKey")!)));
}
return (EventDefinition<string, string, string, string>)definition;
}
/// <summary>
/// Found index on table '{tableName}' with name '{indexName}', is unique: {isUnique}.
/// </summary>
public static EventDefinition<string, string, bool> LogFoundIndex(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundIndex;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundIndex,
logger,
static logger => new EventDefinition<string, string, bool>(
logger.Options,
SqlServerEventId.IndexFound,
LogLevel.Debug,
"SqlServerEventId.IndexFound",
level => LoggerMessage.Define<string, string, bool>(
level,
SqlServerEventId.IndexFound,
_resourceManager.GetString("LogFoundIndex")!)));
}
return (EventDefinition<string, string, bool>)definition;
}
/// <summary>
/// Found primary key on table '{tableName}' with name '{primaryKeyName}'.
/// </summary>
public static EventDefinition<string, string> LogFoundPrimaryKey(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundPrimaryKey;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundPrimaryKey,
logger,
static logger => new EventDefinition<string, string>(
logger.Options,
SqlServerEventId.PrimaryKeyFound,
LogLevel.Debug,
"SqlServerEventId.PrimaryKeyFound",
level => LoggerMessage.Define<string, string>(
level,
SqlServerEventId.PrimaryKeyFound,
_resourceManager.GetString("LogFoundPrimaryKey")!)));
}
return (EventDefinition<string, string>)definition;
}
/// <summary>
/// Found sequence with '{name}', data type: {dataType}, cyclic: {isCyclic}, increment: {increment}, start: {start}, minimum: {min}, maximum: {max}.
/// </summary>
public static FallbackEventDefinition LogFoundSequence(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundSequence;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundSequence,
logger,
static logger => new FallbackEventDefinition(
logger.Options,
SqlServerEventId.SequenceFound,
LogLevel.Debug,
"SqlServerEventId.SequenceFound",
_resourceManager.GetString("LogFoundSequence")!));
}
return (FallbackEventDefinition)definition;
}
/// <summary>
/// Found table with name '{name}'.
/// </summary>
public static EventDefinition<string> LogFoundTable(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundTable;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundTable,
logger,
static logger => new EventDefinition<string>(
logger.Options,
SqlServerEventId.TableFound,
LogLevel.Debug,
"SqlServerEventId.TableFound",
level => LoggerMessage.Define<string>(
level,
SqlServerEventId.TableFound,
_resourceManager.GetString("LogFoundTable")!)));
}
return (EventDefinition<string>)definition;
}
/// <summary>
/// Found type alias with name '{alias}' which maps to underlying data type {dataType}.
/// </summary>
public static EventDefinition<string, string> LogFoundTypeAlias(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundTypeAlias;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundTypeAlias,
logger,
static logger => new EventDefinition<string, string>(
logger.Options,
SqlServerEventId.TypeAliasFound,
LogLevel.Debug,
"SqlServerEventId.TypeAliasFound",
level => LoggerMessage.Define<string, string>(
level,
SqlServerEventId.TypeAliasFound,
_resourceManager.GetString("LogFoundTypeAlias")!)));
}
return (EventDefinition<string, string>)definition;
}
/// <summary>
/// Found unique constraint on table '{tableName}' with name '{uniqueConstraintName}'.
/// </summary>
public static EventDefinition<string, string> LogFoundUniqueConstraint(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundUniqueConstraint;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogFoundUniqueConstraint,
logger,
static logger => new EventDefinition<string, string>(
logger.Options,
SqlServerEventId.UniqueConstraintFound,
LogLevel.Debug,
"SqlServerEventId.UniqueConstraintFound",
level => LoggerMessage.Define<string, string>(
level,
SqlServerEventId.UniqueConstraintFound,
_resourceManager.GetString("LogFoundUniqueConstraint")!)));
}
return (EventDefinition<string, string>)definition;
}
/// <summary>
/// Unable to find a schema in the database matching the selected schema '{schema}'.
/// </summary>
public static EventDefinition<string?> LogMissingSchema(IDiagnosticsLogger logger)
{
var definition = ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogMissingSchema;
if (definition == null)
{
definition = NonCapturingLazyInitializer.EnsureInitialized(
ref ((Diagnostics.Internal.SqlServerLoggingDefinitions)logger.Definitions).LogMissingSchema,
logger,
static logger => new EventDefinition<string?>(
logger.Options,