diff --git a/samples/AotTrimmedSample/Program.cs b/samples/AotTrimmedSample/Program.cs index 0c6aa355970..8b5fb09f508 100644 --- a/samples/AotTrimmedSample/Program.cs +++ b/samples/AotTrimmedSample/Program.cs @@ -33,9 +33,9 @@ public class Person { - public Age Age { get; set; } - public Name Name { get; set; } - public Address Address { get; set; } + public required Age Age { get; set; } + public required Name Name { get; set; } + public required Address Address { get; set; } } [ValueObject] diff --git a/samples/Onion/Domain/Order.cs b/samples/Onion/Domain/Order.cs index f1bc02d3ea4..db57827238d 100644 --- a/samples/Onion/Domain/Order.cs +++ b/samples/Onion/Domain/Order.cs @@ -2,7 +2,7 @@ namespace Domain; public class Order { - public CustomerId CustomerId { get; set; } - public OrderId OrderId { get; set; } - public CustomerName CustomerName { get; set; } + public required CustomerId CustomerId { get; set; } + public required OrderId OrderId { get; set; } + public required CustomerName CustomerName { get; set; } } \ No newline at end of file diff --git a/samples/Vogen.Examples/SerializationAndConversion/EFCore/Types.cs b/samples/Vogen.Examples/SerializationAndConversion/EFCore/Types.cs index 794704d06b4..9cfefc77194 100644 --- a/samples/Vogen.Examples/SerializationAndConversion/EFCore/Types.cs +++ b/samples/Vogen.Examples/SerializationAndConversion/EFCore/Types.cs @@ -4,7 +4,7 @@ public class PersonEntity { public Id Id { get; set; } = null!; // must be null in order for EF core to generate a value public Name Name { get; set; } = Name.NotSet; - public Age Age { get; set; } + public required Age Age { get; set; } } /// diff --git a/samples/Vogen.Examples/SerializationAndConversion/LinqToDbExamples.cs b/samples/Vogen.Examples/SerializationAndConversion/LinqToDbExamples.cs index 30f3babc6eb..a21f6189e25 100644 --- a/samples/Vogen.Examples/SerializationAndConversion/LinqToDbExamples.cs +++ b/samples/Vogen.Examples/SerializationAndConversion/LinqToDbExamples.cs @@ -55,7 +55,7 @@ public class TestEntity [PrimaryKey] [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbStringVo.LinqToDbValueConverter))] - public LinqToDbStringVo Id { get; set; } + public required LinqToDbStringVo Id { get; set; } } } } \ No newline at end of file diff --git a/samples/Vogen.Examples/SerializationAndConversion/MessagePack/MessagePackScenario_using_conversion_attributes.cs b/samples/Vogen.Examples/SerializationAndConversion/MessagePack/MessagePackScenario_using_conversion_attributes.cs index 1c17532f4d9..2fc41f21e3e 100644 --- a/samples/Vogen.Examples/SerializationAndConversion/MessagePack/MessagePackScenario_using_conversion_attributes.cs +++ b/samples/Vogen.Examples/SerializationAndConversion/MessagePack/MessagePackScenario_using_conversion_attributes.cs @@ -23,13 +23,13 @@ namespace Vogen.Examples.SerializationAndConversion.MessagePackScenario.UsingCon public class Person { [Key(0)] - public PersonId Id { get; set; } + public required PersonId Id { get; set; } [Key(1)] - public Name Name { get; set; } + public required Name Name { get; set; } [Key(2)] - public Age Age { get; set; } + public required Age Age { get; set; } } [UsedImplicitly] diff --git a/samples/Vogen.Examples/SerializationAndConversion/MessagePack/MessagePackScenario_using_markers.cs b/samples/Vogen.Examples/SerializationAndConversion/MessagePack/MessagePackScenario_using_markers.cs index f32deee236a..430bde7709e 100644 --- a/samples/Vogen.Examples/SerializationAndConversion/MessagePack/MessagePackScenario_using_markers.cs +++ b/samples/Vogen.Examples/SerializationAndConversion/MessagePack/MessagePackScenario_using_markers.cs @@ -23,13 +23,13 @@ namespace Vogen.Examples.SerializationAndConversion.MessagePackScenario.UsingMar public class Person { [Key(0)] - public PersonId Id { get; set; } + public required PersonId Id { get; set; } [Key(1)] - public Name Name { get; set; } + public required Name Name { get; set; } [Key(2)] - public Age Age { get; set; } + public required Age Age { get; set; } } [MessagePack] diff --git a/samples/Vogen.Examples/SerializationAndConversion/Mongo/MongoScenario.cs b/samples/Vogen.Examples/SerializationAndConversion/Mongo/MongoScenario.cs index 27db5766f04..3e13745db7b 100644 --- a/samples/Vogen.Examples/SerializationAndConversion/Mongo/MongoScenario.cs +++ b/samples/Vogen.Examples/SerializationAndConversion/Mongo/MongoScenario.cs @@ -26,9 +26,9 @@ namespace Vogen.Examples.SerializationAndConversion.Mongo; public class Person { [BsonId] - public ObjectId Id { get; set; } - public Name Name { get; set; } - public Age Age { get; set; } + public required ObjectId Id { get; set; } + public required Name Name { get; set; } + public required Age Age { get; set; } } [UsedImplicitly] diff --git a/samples/WebApplication/Types.cs b/samples/WebApplication/Types.cs index bc2a8739277..ea1674a39d0 100644 --- a/samples/WebApplication/Types.cs +++ b/samples/WebApplication/Types.cs @@ -42,14 +42,14 @@ public partial struct SecretCode; public class Order { - public OrderId OrderId { get; init; } + public required OrderId OrderId { get; init; } public CustomerName CustomerName { get; init; } = CustomerName.From(""); - public SharedStruct SharedStruct { get; init; } + public required SharedStruct SharedStruct { get; init; } public SharedStruct? SharedStructOrNull { get; init; } - public Category CustomerCategory { get; set; } - public Code CustomerCode { get; set; } - public SecretCode CustomerSecretCode { get; set; } + public required Category CustomerCategory { get; set; } + public required Code CustomerCode { get; set; } + public required SecretCode CustomerSecretCode { get; set; } } diff --git a/samples/WebApplicationConsumer/Types.cs b/samples/WebApplicationConsumer/Types.cs index e6582ad7a5c..d20d1eee7a0 100644 --- a/samples/WebApplicationConsumer/Types.cs +++ b/samples/WebApplicationConsumer/Types.cs @@ -32,7 +32,7 @@ public partial struct OrderId public class Order { - public OrderId OrderId { get; init; } + public required OrderId OrderId { get; init; } public CustomerName CustomerName { get; init; } = CustomerName.From(""); } \ No newline at end of file diff --git a/src/Vogen/AnalyzerReleases.Unshipped.md b/src/Vogen/AnalyzerReleases.Unshipped.md index 088fcce3c82..f736b01437c 100644 --- a/src/Vogen/AnalyzerReleases.Unshipped.md +++ b/src/Vogen/AnalyzerReleases.Unshipped.md @@ -6,3 +6,4 @@ Rule ID | Category | Severity | Notes --------|----------|----------|------- +VOG038 | Usage | Info | DoNotUseUninitializedValueObjectInPropertyAnalyzer diff --git a/src/Vogen/Diagnostics/RuleIdentifiers.cs b/src/Vogen/Diagnostics/RuleIdentifiers.cs index ac3d1fc2644..d58182018f0 100644 --- a/src/Vogen/Diagnostics/RuleIdentifiers.cs +++ b/src/Vogen/Diagnostics/RuleIdentifiers.cs @@ -44,4 +44,5 @@ public static class RuleIdentifiers public const string VoReferencedInAConversionMarkerMustExplicitlySpecifyPrimitive = "VOG035"; public const string BothImplicitAndExplicitCastsSpecified = "VOG036"; public const string NumericsGenerationNotApplicable = "VOG037"; + public const string PropertyOfValueObjectShouldBeInitialized = "VOG038"; } \ No newline at end of file diff --git a/src/Vogen/Rules/DoNotUseUninitializedValueObjectInPropertyAnalyzer.cs b/src/Vogen/Rules/DoNotUseUninitializedValueObjectInPropertyAnalyzer.cs new file mode 100644 index 00000000000..29c759e188e --- /dev/null +++ b/src/Vogen/Rules/DoNotUseUninitializedValueObjectInPropertyAnalyzer.cs @@ -0,0 +1,116 @@ +using System.Collections.Immutable; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Diagnostics; +using Vogen.Diagnostics; + +namespace Vogen.Rules; + +/// +/// An analyzer that warns when a Value Object type is used as a non-nullable, non-required property +/// without an initializer, which can lead to uninitialized Value Object instances at runtime. +/// +/// +/// +/// When a class or struct declares a property whose type is a Vogen Value Object, and that property +/// is not nullable, not marked required, and has no initializer, then constructing the +/// containing type without explicitly setting the property will produce an invalid (uninitialized) +/// Value Object. This commonly occurs with EF Core entities and other data-transfer types. +/// +/// +/// The following are acceptable patterns that suppress this diagnostic: +/// +/// Make the property nullable: public MyVo? Prop { get; set; } +/// Add the required modifier: public required MyVo Prop { get; set; } +/// Provide an initializer: public MyVo Prop { get; set; } = MyVo.From(0); +/// Use a getter-only property (must be set via the constructor). +/// +/// +/// +[DiagnosticAnalyzer(LanguageNames.CSharp)] +public class DoNotUseUninitializedValueObjectInPropertyAnalyzer : DiagnosticAnalyzer +{ + // ReSharper disable once ArrangeObjectCreationWhenTypeEvident - current bug in Roslyn analyzer means it + // won't find this and will report: + // "error RS2002: Rule 'XYZ123' is part of the next unshipped analyzer release, but is not a supported diagnostic for any analyzer" + private static readonly DiagnosticDescriptor _rule = new DiagnosticDescriptor( + RuleIdentifiers.PropertyOfValueObjectShouldBeInitialized, + "Value Object property should be initialized", + "Property of Value Object type '{0}' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime", + RuleCategories.Usage, + DiagnosticSeverity.Info, + isEnabledByDefault: true, + description: + "A property whose type is a Value Object is not nullable, not marked 'required', and has no initializer. " + + "Creating an instance of the containing type without explicitly setting this property will produce an " + + "invalid (uninitialized) Value Object. Make the property nullable, add the 'required' modifier, or " + + "provide an initializer."); + + public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(_rule); + + public override void Initialize(AnalysisContext context) + { + context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); + context.EnableConcurrentExecution(); + + context.RegisterSyntaxNodeAction(AnalyzeProperty, SyntaxKind.PropertyDeclaration); + } + + private static void AnalyzeProperty(SyntaxNodeAnalysisContext context) + { + if (VoFilter.IsInCodeThatShouldNotBeAnalyzed(context.Node)) return; + + var propertyDeclaration = (PropertyDeclarationSyntax) context.Node; + + // Properties with an explicit initializer are fine. + if (propertyDeclaration.Initializer is not null) return; + + // Expression-bodied properties compute their value; they can't be uninitialized. + if (propertyDeclaration.ExpressionBody is not null) return; + + // Properties with no accessor list are unusual; skip them. + if (propertyDeclaration.AccessorList is null) return; + + // Getter-only auto-properties *must* be set via a constructor — the compiler enforces this. + // Only warn about properties that callers can leave un-set. + bool hasSetterOrInit = false; + foreach (var accessor in propertyDeclaration.AccessorList.Accessors) + { + if (accessor.IsKind(SyntaxKind.SetAccessorDeclaration) || + accessor.IsKind(SyntaxKind.InitAccessorDeclaration)) + { + hasSetterOrInit = true; + break; + } + } + + if (!hasSetterOrInit) return; + + // Static properties are populated explicitly; skip them. + if (propertyDeclaration.Modifiers.Any(SyntaxKind.StaticKeyword)) return; + + // Properties with the 'required' modifier must be set by the caller. + if (propertyDeclaration.Modifiers.Any(SyntaxKind.RequiredKeyword)) return; + + // Nullable properties (e.g. MyVo?) are intentionally nullable. + if (propertyDeclaration.Type is NullableTypeSyntax) return; + + // Resolve the property type. + var typeInfo = context.SemanticModel.GetTypeInfo(propertyDeclaration.Type); + if (typeInfo.Type is not INamedTypeSymbol namedType) return; + + // Double-check nullability via the semantic model (handles #nullable contexts). + if (typeInfo.Nullability.Annotation == NullableAnnotation.Annotated) return; + + // Skip if the *containing* type is itself a Value Object — avoid flagging VO internals. + var containingType = context.SemanticModel.GetDeclaredSymbol(propertyDeclaration)?.ContainingType; + if (containingType is not null && VoFilter.IsTarget(containingType)) return; + + // Only flag properties whose type is a Vogen Value Object. + if (!VoFilter.IsTarget(namedType)) return; + + context.ReportDiagnostic( + DiagnosticsCatalogue.BuildDiagnostic(_rule, namedType.Name, propertyDeclaration.GetLocation())); + } +} diff --git a/tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs b/tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs new file mode 100644 index 00000000000..fcaff4677e9 --- /dev/null +++ b/tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs @@ -0,0 +1,334 @@ +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; +using FluentAssertions; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Testing; +using Vogen; +using VerifyCS = AnalyzerTests.Verifiers.CSharpAnalyzerVerifier; +// ReSharper disable CoVariantArrayConversion + +namespace AnalyzerTests; + +public class DoNotUseUninitializedValueObjectInPropertyTests +{ + private class AllVoTypes : IEnumerable + { + public IEnumerator GetEnumerator() + { + yield return ["partial class"]; + yield return ["partial struct"]; + yield return ["readonly partial struct"]; + yield return ["partial record class"]; + yield return ["partial record struct"]; + yield return ["readonly partial record struct"]; + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + } + + [Fact] + public async Task NoDiagnosticsForEmptyCode() + { + await VerifyCS.VerifyAnalyzerAsync(string.Empty); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task NoDiagnostic_when_property_has_initializer(string voType) + { + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public class TestClass + { + public MyVo SomeProperty { get; set; } = MyVo.From(0); + } + + """; + + await new TestRunner() + .WithSource(source) + .ValidateWith(d => d.Should().BeEmpty()) + .RunOnAllFrameworks(true); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task NoDiagnostic_when_property_is_nullable(string voType) + { + var source = $$""" + #nullable enable + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public class TestClass + { + public MyVo? SomeProperty { get; set; } + } + + """; + + await new TestRunner() + .WithSource(source) + .ValidateWith(d => d.Should().BeEmpty()) + .RunOnAllFrameworks(true); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task NoDiagnostic_when_property_is_getter_only(string voType) + { + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public class TestClass + { + public TestClass(MyVo vo) { SomeProperty = vo; } + public MyVo SomeProperty { get; } + } + + """; + + await new TestRunner() + .WithSource(source) + .ValidateWith(d => d.Should().BeEmpty()) + .RunOnAllFrameworks(true); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task NoDiagnostic_when_property_is_expression_bodied(string voType) + { + var source = $$""" + using System; + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public class TestClass + { + private MyVo _backing = MyVo.From(1); + public MyVo SomeProperty => _backing; + } + + """; + + await new TestRunner() + .WithSource(source) + .ValidateWith(d => d.Should().BeEmpty()) + .RunOnAllFrameworks(true); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task NoDiagnostic_when_property_is_static(string voType) + { + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public class TestClass + { + public static MyVo SomeProperty { get; set; } + } + + """; + + await new TestRunner() + .WithSource(source) + .ValidateWith(d => d.Should().BeEmpty()) + .RunOnAllFrameworks(true); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task NoDiagnostic_when_property_is_inside_a_value_object(string voType) + { + // A VO declaring a property of another VO type — the outer VO manages its own initialization. + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + [ValueObject(typeof(int))] + public partial class OuterVo + { + public MyVo Inner { get; set; } + } + + """; + + await new TestRunner() + .WithSource(source) + .ValidateWith(d => d.Should().BeEmpty()) + .RunOnAllFrameworks(true); + } + +#if NET7_0_OR_GREATER + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task NoDiagnostic_when_property_has_required_modifier(string voType) + { + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public class TestClass + { + public required MyVo SomeProperty { get; set; } + } + + """; + await Run(source); + // await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task Diagnostic_for_required_missing_init_only_property(string voType) + { + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public class TestClass + { + {|#0:public MyVo SomeInitProperty { get; init; }|} + } + + """; + await Run( + source, + WithDiagnostics("VOG038", DiagnosticSeverity.Info, "MyVo", 0)); + } +#endif + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task Diagnostic_for_non_nullable_uninitialized_get_set_property(string voType) + { + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public class TestClass + { + {|#0:public MyVo SomeProperty { get; set; }|} + } + + """; + await Run( + source, + WithDiagnostics("VOG038", DiagnosticSeverity.Info, "MyVo", 0)); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task Diagnostic_for_multiple_uninitialized_properties(string voType) + { + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + [ValueObject(typeof(string))] + public {{voType}} MyOtherVo { } + + public class TestClass + { + {|#0:public MyVo First { get; set; }|} + {|#1:public MyOtherVo Second { get; set; }|} + } + + """; + await Run( + source, + WithDiagnostics("VOG038", DiagnosticSeverity.Info, "MyVo", 0), + WithDiagnostics("VOG038", DiagnosticSeverity.Info, "MyOtherVo", 1)); + } + + [Theory] + [ClassData(typeof(AllVoTypes))] + public async Task Diagnostic_when_struct_property_is_settable_but_uninitialized(string voType) + { + var source = $$""" + using Vogen; + namespace Whatever; + + [ValueObject(typeof(int))] + public {{voType}} MyVo { } + + public struct ContainerStruct + { + {|#0:public MyVo SomeProperty { get; set; }|} + } + + """; + await Run( + source, + WithDiagnostics("VOG038", DiagnosticSeverity.Info, "MyVo", 0)); + } + + private static IEnumerable WithDiagnostics(string code, DiagnosticSeverity severity, + string argument, params int[] locations) + { + foreach (var location in locations) + { + yield return VerifyCS.Diagnostic(code) + .WithSeverity(severity) + .WithLocation(location) + .WithArguments(argument); + } + } + + private static async Task Run(string source, params IEnumerable[] expectedGroups) + { + var test = new VerifyCS.Test + { + TestState = + { + Sources = { source }, + }, + + CompilerDiagnostics = CompilerDiagnostics.Errors, + ReferenceAssemblies = References.Net90AndOurs.Value, + }; + + foreach (var group in expectedGroups) + { + test.ExpectedDiagnostics.AddRange(group); + } + + await test.RunAsync(); + } +} diff --git a/tests/ConsumerTests/BsonTests.cs b/tests/ConsumerTests/BsonTests.cs index 6d13bcfbd1a..f46cda9d2b8 100644 --- a/tests/ConsumerTests/BsonTests.cs +++ b/tests/ConsumerTests/BsonTests.cs @@ -12,8 +12,8 @@ namespace ConsumerTests.BsonTests; public class Person { - public Name Name { get; init; } - public Age Age { get; init; } + public required Name Name { get; init; } + public required Age Age { get; init; } } public class BsonTests diff --git a/tests/ConsumerTests/BugFixTests/BugFixTests.cs b/tests/ConsumerTests/BugFixTests/BugFixTests.cs index b9ac1d18697..42675425f4e 100644 --- a/tests/ConsumerTests/BugFixTests/BugFixTests.cs +++ b/tests/ConsumerTests/BugFixTests/BugFixTests.cs @@ -45,7 +45,7 @@ public void Bug502_cannot_have_implicit_cast_operator() public class Person { - public Age Age { get; init; } + public required Age Age { get; init; } public Name? Name { get; set; } diff --git a/tests/ConsumerTests/ParsingAndFormattingTests/TryFormatTests.cs b/tests/ConsumerTests/ParsingAndFormattingTests/TryFormatTests.cs index 6bd2256100c..1e5d610e430 100644 --- a/tests/ConsumerTests/ParsingAndFormattingTests/TryFormatTests.cs +++ b/tests/ConsumerTests/ParsingAndFormattingTests/TryFormatTests.cs @@ -48,7 +48,9 @@ public void Uninitialized_vos_output_default_value_when_validation_is_turned_off public class TestContainer { +#pragma warning disable VOG038 public MyId Id1 { get; set; } +#pragma warning restore VOG038 public MyId Id2 { get; set; } = MyId.From(Guid.Empty); public override string ToString() diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/AnyOtherTypeVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/AnyOtherTypeVoTests.cs index 6b2e1e6ecc6..1263db5f72b 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/AnyOtherTypeVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/AnyOtherTypeVoTests.cs @@ -304,13 +304,13 @@ public class EfCoreTestEntity { public int Id { get; set; } - public EfCoreFooVo FooField { get; set; } + public required EfCoreFooVo FooField { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbFooVo.LinqToDbValueConverter))] - public LinqToDbFooVo FooField { get; set; } + public required LinqToDbFooVo FooField { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/BoolVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/BoolVoTests.cs index 1f07ae738e7..ea91ffdb14e 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/BoolVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/BoolVoTests.cs @@ -263,13 +263,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreBoolVo Id { get; set; } + public required EfCoreBoolVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Boolean)] [ValueConverter(ConverterType = typeof(LinqToDbBoolVo.LinqToDbValueConverter))] - public LinqToDbBoolVo Id { get; set; } + public required LinqToDbBoolVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/ByteVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/ByteVoTests.cs index f2e9dd1bdec..72ce9753e12 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/ByteVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/ByteVoTests.cs @@ -275,13 +275,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreByteVo Id { get; set; } + public required EfCoreByteVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Byte)] [ValueConverter(ConverterType = typeof(LinqToDbByteVo.LinqToDbValueConverter))] - public LinqToDbByteVo Id { get; set; } + public required LinqToDbByteVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/CharVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/CharVoTests.cs index bc6d433e56a..b9ca4384e6f 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/CharVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/CharVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -237,13 +237,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreCharVo Id { get; set; } + public required EfCoreCharVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Char)] [ValueConverter(ConverterType = typeof(LinqToDbCharVo.LinqToDbValueConverter))] - public LinqToDbCharVo Id { get; set; } + public required LinqToDbCharVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateOnlyVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateOnlyVoTests.cs index 8c2d6fab294..2c020263cee 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateOnlyVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateOnlyVoTests.cs @@ -257,14 +257,14 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateOnlyVo Id { get; set; } + public required EfCoreDateOnlyVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Date)] [ValueConverter(ConverterType = typeof(LinqToDbDateOnlyVo.LinqToDbValueConverter))] - public LinqToDbDateOnlyVo Id { get; set; } + public required LinqToDbDateOnlyVo Id { get; set; } } } } diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateTimeOffsetVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateTimeOffsetVoTests.cs index 8e2bbe41673..1a01359ee8b 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateTimeOffsetVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateTimeOffsetVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -260,13 +260,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateTimeOffsetVo Id { get; set; } + public required EfCoreDateTimeOffsetVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.DateTimeOffset)] [ValueConverter(ConverterType = typeof(LinqToDbDateTimeOffsetVo.LinqToDbValueConverter))] - public LinqToDbDateTimeOffsetVo Id { get; set; } + public required LinqToDbDateTimeOffsetVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateTimeVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateTimeVoTests.cs index 74c38c2c569..d54307fefc2 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateTimeVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DateTimeVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -266,13 +266,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateTimeVo Id { get; set; } + public required EfCoreDateTimeVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.DateTime)] [ValueConverter(ConverterType = typeof(LinqToDbDateTimeVo.LinqToDbValueConverter))] - public LinqToDbDateTimeVo Id { get; set; } + public required LinqToDbDateTimeVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DecimalVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DecimalVoTests.cs index 1f382599fe5..4e4bc4da8ca 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DecimalVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DecimalVoTests.cs @@ -305,13 +305,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDecimalVo Id { get; set; } + public required EfCoreDecimalVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Decimal)] [ValueConverter(ConverterType = typeof(LinqToDbDecimalVo.LinqToDbValueConverter))] - public LinqToDbDecimalVo Id { get; set; } + public required LinqToDbDecimalVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DoubleVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DoubleVoTests.cs index 007f00deae1..5b5da6c31bb 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DoubleVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/DoubleVoTests.cs @@ -292,13 +292,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDoubleVo Id { get; set; } + public required EfCoreDoubleVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Double)] [ValueConverter(ConverterType = typeof(LinqToDbDoubleVo.LinqToDbValueConverter))] - public LinqToDbDoubleVo Id { get; set; } + public required LinqToDbDoubleVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/FloatVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/FloatVoTests.cs index 243855ba839..d97ba7a347c 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/FloatVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/FloatVoTests.cs @@ -271,13 +271,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreFloatVo Id { get; set; } + public required EfCoreFloatVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Single)] [ValueConverter(ConverterType = typeof(LinqToDbFloatVo.LinqToDbValueConverter))] - public LinqToDbFloatVo Id { get; set; } + public required LinqToDbFloatVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/GuidVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/GuidVoTests.cs index f738412aeba..8e3f9e7d97e 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/GuidVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/GuidVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -247,13 +247,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreGuidVo Id { get; set; } + public required EfCoreGuidVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Guid)] [ValueConverter(ConverterType = typeof(LinqToDbGuidVo.LinqToDbValueConverter))] - public LinqToDbGuidVo Id { get; set; } + public required LinqToDbGuidVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/IntVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/IntVoTests.cs index c3707db73aa..0ec2234fd66 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/IntVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/IntVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -255,13 +255,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreIntVo Id { get; set; } + public required EfCoreIntVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int32)] [ValueConverter(ConverterType = typeof(LinqToDbIntVo.LinqToDbValueConverter))] - public LinqToDbIntVo Id { get; set; } + public required LinqToDbIntVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/LongVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/LongVoTests.cs index d9e2f16df22..921c70ad3e8 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/LongVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/LongVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -254,13 +254,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreLongVo Id { get; set; } + public required EfCoreLongVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int64)] [ValueConverter(ConverterType = typeof(LinqToDbLongVo.LinqToDbValueConverter))] - public LinqToDbLongVo Id { get; set; } + public required LinqToDbLongVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/ShortVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/ShortVoTests.cs index ea1307e2d84..29f18f5eed6 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/ShortVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/ShortVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -255,13 +255,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreShortVo Id { get; set; } + public required EfCoreShortVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int16)] [ValueConverter(ConverterType = typeof(LinqToDbShortVo.LinqToDbValueConverter))] - public LinqToDbShortVo Id { get; set; } + public required LinqToDbShortVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/StringVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/StringVoTests.cs index 171145d0399..5e09449b895 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/StringVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/StringVoTests.cs @@ -249,13 +249,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreStringVo Id { get; init; } + public required EfCoreStringVo Id { get; init; } } public class LinqToDbTestEntity { [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbStringVo.LinqToDbValueConverter))] - public LinqToDbStringVo Id { get; init; } + public required LinqToDbStringVo Id { get; init; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/TimeOnlyVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/TimeOnlyVoTests.cs index 1bac4aa4228..a5776e3f278 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/TimeOnlyVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/ClassVos/TimeOnlyVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -261,14 +261,14 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreTimeOnlyVo Id { get; set; } + public required EfCoreTimeOnlyVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Time)] [ValueConverter(ConverterType = typeof(LinqToDbTimeOnlyVo.LinqToDbValueConverter))] - public LinqToDbTimeOnlyVo Id { get; set; } + public required LinqToDbTimeOnlyVo Id { get; set; } } } } diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/AnyOtherTypeVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/AnyOtherTypeVoTests.cs index 5d40310b836..4157b257229 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/AnyOtherTypeVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/AnyOtherTypeVoTests.cs @@ -304,13 +304,13 @@ public class EfCoreTestEntity { public int Id { get; set; } - public EfCoreFooVo FooField { get; set; } + public required EfCoreFooVo FooField { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbFooVo.LinqToDbValueConverter))] - public LinqToDbFooVo FooField { get; set; } + public required LinqToDbFooVo FooField { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/BoolVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/BoolVoTests.cs index dddcada93f3..75d3001a560 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/BoolVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/BoolVoTests.cs @@ -263,13 +263,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreBoolVo Id { get; set; } + public required EfCoreBoolVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Boolean)] [ValueConverter(ConverterType = typeof(LinqToDbBoolVo.LinqToDbValueConverter))] - public LinqToDbBoolVo Id { get; set; } + public required LinqToDbBoolVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/ByteVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/ByteVoTests.cs index d2a8304a633..f496dc50c47 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/ByteVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/ByteVoTests.cs @@ -247,13 +247,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreByteVo Id { get; set; } + public required EfCoreByteVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Byte)] [ValueConverter(ConverterType = typeof(LinqToDbByteVo.LinqToDbValueConverter))] - public LinqToDbByteVo Id { get; set; } + public required LinqToDbByteVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/CharVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/CharVoTests.cs index 017f8c6f134..e31c3a7dd04 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/CharVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/CharVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -246,13 +246,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreCharVo Id { get; set; } + public required EfCoreCharVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Char)] [ValueConverter(ConverterType = typeof(LinqToDbCharVo.LinqToDbValueConverter))] - public LinqToDbCharVo Id { get; set; } + public required LinqToDbCharVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DateTimeOffsetVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DateTimeOffsetVoTests.cs index 5796ce5b817..b293d0a65db 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DateTimeOffsetVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DateTimeOffsetVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -259,13 +259,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateTimeOffsetVo Id { get; set; } + public required EfCoreDateTimeOffsetVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.DateTimeOffset)] [ValueConverter(ConverterType = typeof(LinqToDbDateTimeOffsetVo.LinqToDbValueConverter))] - public LinqToDbDateTimeOffsetVo Id { get; set; } + public required LinqToDbDateTimeOffsetVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DateTimeVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DateTimeVoTests.cs index 27d148cca48..266dc97c1ef 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DateTimeVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DateTimeVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -263,13 +263,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateTimeVo Id { get; set; } + public required EfCoreDateTimeVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.DateTime)] [ValueConverter(ConverterType = typeof(LinqToDbDateTimeVo.LinqToDbValueConverter))] - public LinqToDbDateTimeVo Id { get; set; } + public required LinqToDbDateTimeVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DecimalVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DecimalVoTests.cs index a64a4a72cf7..0e1fca510e0 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DecimalVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DecimalVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -277,13 +277,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDecimalVo Id { get; set; } + public required EfCoreDecimalVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Decimal)] [ValueConverter(ConverterType = typeof(LinqToDbDecimalVo.LinqToDbValueConverter))] - public LinqToDbDecimalVo Id { get; set; } + public required LinqToDbDecimalVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DoubleVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DoubleVoTests.cs index baae869850d..00d2232950b 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DoubleVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/DoubleVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -269,13 +269,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDoubleVo Id { get; set; } + public required EfCoreDoubleVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Double)] [ValueConverter(ConverterType = typeof(LinqToDbDoubleVo.LinqToDbValueConverter))] - public LinqToDbDoubleVo Id { get; set; } + public required LinqToDbDoubleVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/FloatVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/FloatVoTests.cs index b2be6008767..f628ce05ca0 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/FloatVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/FloatVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -269,13 +269,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreFloatVo Id { get; set; } + public required EfCoreFloatVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Single)] [ValueConverter(ConverterType = typeof(LinqToDbFloatVo.LinqToDbValueConverter))] - public LinqToDbFloatVo Id { get; set; } + public required LinqToDbFloatVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/GuidVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/GuidVoTests.cs index d7d28e543e6..dee2d6cfe98 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/GuidVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/GuidVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -245,13 +245,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreGuidVo Id { get; set; } + public required EfCoreGuidVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Guid)] [ValueConverter(ConverterType = typeof(LinqToDbGuidVo.LinqToDbValueConverter))] - public LinqToDbGuidVo Id { get; set; } + public required LinqToDbGuidVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/IntVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/IntVoTests.cs index cc0ce41ef4d..8d3f7d17734 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/IntVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/IntVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -244,13 +244,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreIntVo Id { get; set; } + public required EfCoreIntVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int32)] [ValueConverter(ConverterType = typeof(LinqToDbIntVo.LinqToDbValueConverter))] - public LinqToDbIntVo Id { get; set; } + public required LinqToDbIntVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/LongVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/LongVoTests.cs index 5bc1154b3ce..ef361e5ccd1 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/LongVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/LongVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -244,13 +244,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreLongVo Id { get; set; } + public required EfCoreLongVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int64)] [ValueConverter(ConverterType = typeof(LinqToDbLongVo.LinqToDbValueConverter))] - public LinqToDbLongVo Id { get; set; } + public required LinqToDbLongVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/ShortVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/ShortVoTests.cs index 096573288cc..5285e841754 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/ShortVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/ShortVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -244,13 +244,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreShortVo Id { get; set; } + public required EfCoreShortVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int16)] [ValueConverter(ConverterType = typeof(LinqToDbShortVo.LinqToDbValueConverter))] - public LinqToDbShortVo Id { get; set; } + public required LinqToDbShortVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/StringVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/StringVoTests.cs index 83bb51800dc..40727e6e653 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/StringVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordClassVos/StringVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -245,13 +245,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreStringVo Id { get; set; } + public required EfCoreStringVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbStringVo.LinqToDbValueConverter))] - public LinqToDbStringVo Id { get; set; } + public required LinqToDbStringVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/AnyOtherTypeVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/AnyOtherTypeVoTests.cs index afca94dde9f..58ac7dd2bda 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/AnyOtherTypeVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/AnyOtherTypeVoTests.cs @@ -306,13 +306,13 @@ public class EfCoreTestEntity { public int Id { get; set; } - public EfCoreFooVo FooField { get; set; } + public required EfCoreFooVo FooField { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbFooVo.LinqToDbValueConverter))] - public LinqToDbFooVo FooField { get; set; } + public required LinqToDbFooVo FooField { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/BoolVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/BoolVoTests.cs index 689a7eaf3fa..0dae8a000b7 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/BoolVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/BoolVoTests.cs @@ -263,13 +263,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreBoolVo Id { get; set; } + public required EfCoreBoolVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Boolean)] [ValueConverter(ConverterType = typeof(LinqToDbBoolVo.LinqToDbValueConverter))] - public LinqToDbBoolVo Id { get; set; } + public required LinqToDbBoolVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/ByteVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/ByteVoTests.cs index 7e06ebdf035..9b88b9a925f 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/ByteVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/ByteVoTests.cs @@ -247,13 +247,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreByteVo Id { get; set; } + public required EfCoreByteVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Byte)] [ValueConverter(ConverterType = typeof(LinqToDbByteVo.LinqToDbValueConverter))] - public LinqToDbByteVo Id { get; set; } + public required LinqToDbByteVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/CharVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/CharVoTests.cs index 7f7f8d1348b..d7e6803d145 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/CharVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/CharVoTests.cs @@ -246,13 +246,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreCharVo Id { get; set; } + public required EfCoreCharVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Char)] [ValueConverter(ConverterType = typeof(LinqToDbCharVo.LinqToDbValueConverter))] - public LinqToDbCharVo Id { get; set; } + public required LinqToDbCharVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DateTimeOffsetVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DateTimeOffsetVoTests.cs index a4f1e2dd17f..e7a38c78826 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DateTimeOffsetVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DateTimeOffsetVoTests.cs @@ -260,13 +260,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateTimeOffsetVo Id { get; set; } + public required EfCoreDateTimeOffsetVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.DateTimeOffset)] [ValueConverter(ConverterType = typeof(LinqToDbDateTimeOffsetVo.LinqToDbValueConverter))] - public LinqToDbDateTimeOffsetVo Id { get; set; } + public required LinqToDbDateTimeOffsetVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DateTimeVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DateTimeVoTests.cs index 83b95faa4ac..2ec3db8a517 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DateTimeVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DateTimeVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -264,13 +264,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateTimeVo Id { get; set; } + public required EfCoreDateTimeVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.DateTime)] [ValueConverter(ConverterType = typeof(LinqToDbDateTimeVo.LinqToDbValueConverter))] - public LinqToDbDateTimeVo Id { get; set; } + public required LinqToDbDateTimeVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DecimalVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DecimalVoTests.cs index 01492d71e98..c525ad22d65 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DecimalVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DecimalVoTests.cs @@ -277,13 +277,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDecimalVo Id { get; set; } + public required EfCoreDecimalVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Decimal)] [ValueConverter(ConverterType = typeof(LinqToDbDecimalVo.LinqToDbValueConverter))] - public LinqToDbDecimalVo Id { get; set; } + public required LinqToDbDecimalVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DoubleVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DoubleVoTests.cs index efc695d82c1..7fea1796522 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DoubleVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/DoubleVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -269,13 +269,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDoubleVo Id { get; set; } + public required EfCoreDoubleVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Double)] [ValueConverter(ConverterType = typeof(LinqToDbDoubleVo.LinqToDbValueConverter))] - public LinqToDbDoubleVo Id { get; set; } + public required LinqToDbDoubleVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/FloatVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/FloatVoTests.cs index d9c92aa01d6..e0482245eee 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/FloatVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/FloatVoTests.cs @@ -269,13 +269,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreFloatVo Id { get; set; } + public required EfCoreFloatVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Single)] [ValueConverter(ConverterType = typeof(LinqToDbFloatVo.LinqToDbValueConverter))] - public LinqToDbFloatVo Id { get; set; } + public required LinqToDbFloatVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/GuidVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/GuidVoTests.cs index 808129c1f96..5e108896a34 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/GuidVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/GuidVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -245,13 +245,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreGuidVo Id { get; set; } + public required EfCoreGuidVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Guid)] [ValueConverter(ConverterType = typeof(LinqToDbGuidVo.LinqToDbValueConverter))] - public LinqToDbGuidVo Id { get; set; } + public required LinqToDbGuidVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/IntVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/IntVoTests.cs index 45166b3ae26..96bb3f2b1fe 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/IntVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/IntVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -244,13 +244,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreIntVo Id { get; set; } + public required EfCoreIntVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int32)] [ValueConverter(ConverterType = typeof(LinqToDbIntVo.LinqToDbValueConverter))] - public LinqToDbIntVo Id { get; set; } + public required LinqToDbIntVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/LongVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/LongVoTests.cs index e2e452c24c9..19112e6309b 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/LongVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/LongVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -244,13 +244,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreLongVo Id { get; set; } + public required EfCoreLongVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int64)] [ValueConverter(ConverterType = typeof(LinqToDbLongVo.LinqToDbValueConverter))] - public LinqToDbLongVo Id { get; set; } + public required LinqToDbLongVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/ShortVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/ShortVoTests.cs index 2a966577d10..9ea73c4e3a0 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/ShortVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/ShortVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -244,13 +244,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreShortVo Id { get; set; } + public required EfCoreShortVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int16)] [ValueConverter(ConverterType = typeof(LinqToDbShortVo.LinqToDbValueConverter))] - public LinqToDbShortVo Id { get; set; } + public required LinqToDbShortVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/StringVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/StringVoTests.cs index cf4ff217074..30ec9d16054 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/StringVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/RecordStructVos/StringVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -245,13 +245,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreStringVo Id { get; set; } + public required EfCoreStringVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbStringVo.LinqToDbValueConverter))] - public LinqToDbStringVo Id { get; set; } + public required LinqToDbStringVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/AnyOtherTypeVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/AnyOtherTypeVoTests.cs index 8fa22084a77..3147652d52e 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/AnyOtherTypeVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/AnyOtherTypeVoTests.cs @@ -304,13 +304,13 @@ public class EfCoreTestEntity { public int Id { get; set; } - public EfCoreFooVo FooField { get; set; } + public required EfCoreFooVo FooField { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbFooVo.LinqToDbValueConverter))] - public LinqToDbFooVo FooField { get; set; } + public required LinqToDbFooVo FooField { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/BoolVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/BoolVoTests.cs index ea86ae1ecbe..d888c78b691 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/BoolVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/BoolVoTests.cs @@ -263,13 +263,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreBoolVo Id { get; set; } + public required EfCoreBoolVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Boolean)] [ValueConverter(ConverterType = typeof(LinqToDbBoolVo.LinqToDbValueConverter))] - public LinqToDbBoolVo Id { get; set; } + public required LinqToDbBoolVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/ByteVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/ByteVoTests.cs index 312f1e901ec..10cd9648b3e 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/ByteVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/ByteVoTests.cs @@ -247,13 +247,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreByteVo Id { get; set; } + public required EfCoreByteVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Byte)] [ValueConverter(ConverterType = typeof(LinqToDbByteVo.LinqToDbValueConverter))] - public LinqToDbByteVo Id { get; set; } + public required LinqToDbByteVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/CharVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/CharVoTests.cs index 232bde8aa56..0ff9a6b85d5 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/CharVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/CharVoTests.cs @@ -246,13 +246,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreCharVo Id { get; set; } + public required EfCoreCharVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Char)] [ValueConverter(ConverterType = typeof(LinqToDbCharVo.LinqToDbValueConverter))] - public LinqToDbCharVo Id { get; set; } + public required LinqToDbCharVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DateTimeOffsetVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DateTimeOffsetVoTests.cs index e2d63866ae4..78a58214bef 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DateTimeOffsetVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DateTimeOffsetVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -259,13 +259,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateTimeOffsetVo Id { get; set; } + public required EfCoreDateTimeOffsetVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.DateTimeOffset)] [ValueConverter(ConverterType = typeof(LinqToDbDateTimeOffsetVo.LinqToDbValueConverter))] - public LinqToDbDateTimeOffsetVo Id { get; set; } + public required LinqToDbDateTimeOffsetVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DateTimeVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DateTimeVoTests.cs index 33750eed171..9921848ffa9 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DateTimeVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DateTimeVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -264,13 +264,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDateTimeVo Id { get; set; } + public required EfCoreDateTimeVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.DateTime)] [ValueConverter(ConverterType = typeof(LinqToDbDateTimeVo.LinqToDbValueConverter))] - public LinqToDbDateTimeVo Id { get; set; } + public required LinqToDbDateTimeVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DecimalVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DecimalVoTests.cs index ee96570596e..553cb072e67 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DecimalVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DecimalVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -256,13 +256,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDecimalVo Id { get; set; } + public required EfCoreDecimalVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Decimal)] [ValueConverter(ConverterType = typeof(LinqToDbDecimalVo.LinqToDbValueConverter))] - public LinqToDbDecimalVo Id { get; set; } + public required LinqToDbDecimalVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DoubleVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DoubleVoTests.cs index 8b1d71cfaf1..d3133ada6e6 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DoubleVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/DoubleVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -247,13 +247,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreDoubleVo Id { get; set; } + public required EfCoreDoubleVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Double)] [ValueConverter(ConverterType = typeof(LinqToDbDoubleVo.LinqToDbValueConverter))] - public LinqToDbDoubleVo Id { get; set; } + public required LinqToDbDoubleVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/FloatVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/FloatVoTests.cs index 783b78f5dc3..b15c08522db 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/FloatVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/FloatVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Globalization; using System.Linq; @@ -247,13 +247,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreFloatVo Id { get; set; } + public required EfCoreFloatVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Single)] [ValueConverter(ConverterType = typeof(LinqToDbFloatVo.LinqToDbValueConverter))] - public LinqToDbFloatVo Id { get; set; } + public required LinqToDbFloatVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/GuidVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/GuidVoTests.cs index f3eb84ded05..d57b86d963a 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/GuidVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/GuidVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -245,13 +245,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreGuidVo Id { get; set; } + public required EfCoreGuidVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Guid)] [ValueConverter(ConverterType = typeof(LinqToDbGuidVo.LinqToDbValueConverter))] - public LinqToDbGuidVo Id { get; set; } + public required LinqToDbGuidVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/IntVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/IntVoTests.cs index ece487d5094..47232d2804e 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/IntVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/IntVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -250,13 +250,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreIntVo Id { get; set; } + public required EfCoreIntVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int32)] [ValueConverter(ConverterType = typeof(LinqToDbIntVo.LinqToDbValueConverter))] - public LinqToDbIntVo Id { get; set; } + public required LinqToDbIntVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/LongVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/LongVoTests.cs index 4b384b772cd..d1216c57986 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/LongVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/LongVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -244,13 +244,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreLongVo Id { get; set; } + public required EfCoreLongVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int64)] [ValueConverter(ConverterType = typeof(LinqToDbLongVo.LinqToDbValueConverter))] - public LinqToDbLongVo Id { get; set; } + public required LinqToDbLongVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/ShortVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/ShortVoTests.cs index 7599b5265ea..92e5a4139d2 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/ShortVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/ShortVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -244,13 +244,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreShortVo Id { get; set; } + public required EfCoreShortVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.Int16)] [ValueConverter(ConverterType = typeof(LinqToDbShortVo.LinqToDbValueConverter))] - public LinqToDbShortVo Id { get; set; } + public required LinqToDbShortVo Id { get; set; } } } \ No newline at end of file diff --git a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/StringVoTests.cs b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/StringVoTests.cs index a80b7fd574a..e0ace06bf2a 100644 --- a/tests/ConsumerTests/SerializationAndConversionTests/StructVos/StringVoTests.cs +++ b/tests/ConsumerTests/SerializationAndConversionTests/StructVos/StringVoTests.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.ComponentModel; using System.Linq; using System.Threading.Tasks; @@ -246,13 +246,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public class EfCoreTestEntity { - public EfCoreStringVo Id { get; set; } + public required EfCoreStringVo Id { get; set; } } public class LinqToDbTestEntity { [Column(DataType = DataType.VarChar)] [ValueConverter(ConverterType = typeof(LinqToDbStringVo.LinqToDbValueConverter))] - public LinqToDbStringVo Id { get; set; } + public required LinqToDbStringVo Id { get; set; } } } \ No newline at end of file