Skip to content

Commit fc395ef

Browse files
authored
Change build 2.1 to 6.0
+ code cleanup
1 parent f88fde6 commit fc395ef

5 files changed

Lines changed: 10 additions & 17 deletions

File tree

EFCore.VisualBasic/Scaffolding/Internal/VisualBasicDbContextGenerator.vb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,23 +575,21 @@ Namespace Scaffolding.Internal
575575
Dim methodName As String = ""
576576

577577
Select Case valueGenerated
578-
Case = ValueGenerated.OnAdd
578+
Case ValueGenerated.OnAdd
579579
methodName = NameOf(PropertyBuilder.ValueGeneratedOnAdd)
580-
Case = ValueGenerated.OnAddOrUpdate
580+
Case ValueGenerated.OnAddOrUpdate
581581
methodName = If(prop.IsConcurrencyToken,
582582
NameOf(PropertyBuilder.IsRowVersion),
583583
NameOf(PropertyBuilder.ValueGeneratedOnAddOrUpdate))
584-
585-
Case = ValueGenerated.OnUpdate
584+
Case ValueGenerated.OnUpdate
586585
methodName = NameOf(PropertyBuilder.ValueGeneratedOnUpdate)
587-
Case = ValueGenerated.Never
586+
Case ValueGenerated.Never
588587
methodName = NameOf(PropertyBuilder.ValueGeneratedNever)
589588
Case Else
590589
Throw New InvalidOperationException(DesignStrings.UnhandledEnumValue($"{NameOf(valueGenerated)}.{valueGenerated}"))
591590
End Select
592591

593592
lines.Add($"{methodName}()")
594-
595593
End If
596594
End If
597595

EFCore.VisualBasic/build/netstandard2.1/EFCoreVisualBasic.vb renamed to EFCore.VisualBasic/build/net6.0/EFCoreVisualBasic.vb

File renamed without changes.

EFCore.VisualBasic/build/netstandard2.1/EntityFrameworkCore.VisualBasic.targets renamed to EFCore.VisualBasic/build/net6.0/EntityFrameworkCore.VisualBasic.targets

File renamed without changes.

Sandbox/Sandbox.vbproj

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net6.0</TargetFramework>
66
<IsPackable>False</IsPackable>
7+
<OptionStrict>On</OptionStrict>
78
</PropertyGroup>
8-
9-
<ItemGroup>
10-
<Compile Remove="Scaffolding\**" />
11-
<EmbeddedResource Remove="Scaffolding\**" />
12-
<None Remove="Scaffolding\**" />
13-
</ItemGroup>
14-
9+
1510
<ItemGroup>
1611
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0-rtm.21474.9" />
1712
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rtm.21474.9">
@@ -29,7 +24,7 @@
2924
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
3025
</None>
3126
</ItemGroup>
32-
33-
<Import Project="..\EFCore.VisualBasic\build\netstandard2.1\EntityFrameworkCore.VisualBasic.targets" />
27+
28+
<Import Project="..\EFCore.VisualBasic\build\net6.0\EntityFrameworkCore.VisualBasic.targets" />
3429

3530
</Project>

Test/EFCore.VisualBasic.Test/Scaffolding/Internal/VisualBasicEntityTypeGeneratorTest.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,7 @@ End Namespace
21742174

21752175
Protected Overrides Function GenerateDataAnnotation(entityType As IEntityType, annotation As IAnnotation) As AttributeCodeFragment
21762176
Select Case annotation.Name
2177-
Case = "Custom:EntityAnnotation"
2177+
Case "Custom:EntityAnnotation"
21782178
Return New AttributeCodeFragment(GetType(CustomEntityDataAnnotationAttribute),
21792179
TryCast(annotation.Value, String))
21802180
Case Else
@@ -2184,7 +2184,7 @@ End Namespace
21842184

21852185
Protected Overrides Function GenerateDataAnnotation([property] As IProperty, annotation As IAnnotation) As AttributeCodeFragment
21862186
Select Case annotation.Name
2187-
Case = "Custom:PropertyAnnotation"
2187+
Case "Custom:PropertyAnnotation"
21882188
Return New AttributeCodeFragment(GetType(CustomPropertyDataAnnotationAttribute),
21892189
TryCast(annotation.Value, String))
21902190
Case Else

0 commit comments

Comments
 (0)