Skip to content

Commit 93aabfd

Browse files
Ticket #2 : Update provider for .NET CORE 3.0
1 parent 4280517 commit 93aabfd

52 files changed

Lines changed: 884 additions & 2603 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
77
<ProjectReference Include="..\..\src\EFCore.Cassandra\EFCore.Cassandra.csproj" />
88
</ItemGroup>
9+
<ItemGroup>
10+
<Folder Include="Migrations\" />
11+
</ItemGroup>
912
</Project>

samples/EFCore.Cassandra.Samples/FakeDbContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
3030
.ForCassandraSetClusterColumns(s => new { s.LastName });
3131
modelBuilder.Entity<Applicant>()
3232
.Property(p => p.TimeUuid)
33-
.HasConversion(timeUuidConverter);
33+
.HasConversion(new TimeUuidToGuidConverter());
3434
modelBuilder.Entity<Applicant>()
3535
.Property(p => p.Id)
3636
.HasColumnName("id");

samples/EFCore.Cassandra.Samples/Migrations/20200312105035_InitialCreate.Designer.cs

Lines changed: 0 additions & 91 deletions
This file was deleted.

samples/EFCore.Cassandra.Samples/Migrations/20200520135456_Init.Designer.cs

Lines changed: 112 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/EFCore.Cassandra.Samples/Migrations/20200312105035_InitialCreate.cs renamed to samples/EFCore.Cassandra.Samples/Migrations/20200520135456_Init.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace EFCore.Cassandra.Samples.Migrations
99
{
10-
public partial class InitialCreate : Migration
10+
public partial class Init : Migration
1111
{
1212
protected override void Up(MigrationBuilder migrationBuilder)
1313
{

samples/EFCore.Cassandra.Samples/Migrations/FakeDbContextModelSnapshot.cs

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,70 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1919
#pragma warning disable 612, 618
2020
modelBuilder
2121
.HasAnnotation("Cassandra:Keyspacecv", "{\"ReplicationFactor\":2,\"ReplicationClass\":0}")
22-
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079");
22+
.HasAnnotation("ProductVersion", "3.1.4");
2323

2424
modelBuilder.Entity("EFCore.Cassandra.Samples.Models.Applicant", b =>
2525
{
2626
b.Property<Guid>("Id")
27-
.HasColumnName("id");
27+
.HasColumnName("id")
28+
.HasColumnType("uuid");
2829

29-
b.Property<string>("LastName");
30+
b.Property<string>("LastName")
31+
.HasColumnType("text");
3032

31-
b.Property<BigInteger>("BigInteger");
33+
b.Property<BigInteger>("BigInteger")
34+
.HasColumnType("varint");
3235

33-
b.Property<byte[]>("Blob");
36+
b.Property<byte[]>("Blob")
37+
.HasColumnType("blob");
3438

35-
b.Property<bool>("Bool");
39+
b.Property<bool>("Bool")
40+
.HasColumnType("boolean");
3641

37-
b.Property<DateTimeOffset>("DateTimeOffset");
42+
b.Property<DateTimeOffset>("DateTimeOffset")
43+
.HasColumnType("timestamp");
3844

39-
b.Property<decimal>("Decimal");
45+
b.Property<decimal>("Decimal")
46+
.HasColumnType("decimal");
4047

41-
b.Property<IDictionary<string, string>>("Dic");
48+
b.Property<IDictionary<string, string>>("Dic")
49+
.HasColumnType("map<text,text>");
4250

43-
b.Property<double>("Double");
51+
b.Property<double>("Double")
52+
.HasColumnType("double");
4453

45-
b.Property<float>("Float");
54+
b.Property<float>("Float")
55+
.HasColumnType("float");
4656

47-
b.Property<int>("Integer");
57+
b.Property<int>("Integer")
58+
.HasColumnType("int");
4859

49-
b.Property<IPAddress>("Ip");
60+
b.Property<IPAddress>("Ip")
61+
.HasColumnType("inet");
5062

51-
b.Property<LocalDate>("LocalDate");
63+
b.Property<LocalDate>("LocalDate")
64+
.HasColumnType("date");
5265

53-
b.Property<LocalTime>("LocalTime");
66+
b.Property<LocalTime>("LocalTime")
67+
.HasColumnType("time");
5468

55-
b.Property<long>("Long");
69+
b.Property<long>("Long")
70+
.HasColumnType("bigint");
5671

57-
b.Property<IList<string>>("Lst");
72+
b.Property<IList<string>>("Lst")
73+
.HasColumnType("list<text>");
5874

59-
b.Property<IList<int>>("LstInt");
75+
b.Property<IList<int>>("LstInt")
76+
.HasColumnType("list<int>");
6077

61-
b.Property<sbyte>("Sbyte");
78+
b.Property<sbyte>("Sbyte")
79+
.HasColumnType("tinyint");
6280

63-
b.Property<short>("SmallInt");
81+
b.Property<short>("SmallInt")
82+
.HasColumnType("smallint");
6483

6584
b.Property<Guid>("TimeUuid")
66-
.HasConversion(new ValueConverter<Guid, Guid>(v => default(Guid), v => default(Guid), new ConverterMappingHints(size: 36)));
85+
.HasColumnType("uuid");
6786

6887
b.HasKey("Id", "LastName");
6988

@@ -75,9 +94,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
7594
modelBuilder.Entity("EFCore.Cassandra.Samples.Models.CV", b =>
7695
{
7796
b.Property<Guid>("Id")
78-
.ValueGeneratedOnAdd();
97+
.ValueGeneratedOnAdd()
98+
.HasColumnType("uuid");
7999

80-
b.Property<string>("Name");
100+
b.Property<string>("Name")
101+
.HasColumnType("text");
81102

82103
b.HasKey("Id");
83104

samples/EFCore.Cassandra.Samples/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ static void Main(string[] args)
2020
dbContext.Applicants.Add(BuildApplicant());
2121
dbContext.SaveChanges();
2222

23+
var appls = dbContext.Applicants.ToList();
24+
2325
Console.WriteLine($"Number of applicants : {dbContext.Applicants.LongCount()}");
2426

2527
Console.WriteLine("Update the applicant");

0 commit comments

Comments
 (0)