Skip to content

Commit

Permalink
Ticket #2 : Update provider for .NET CORE 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thabart committed May 20, 2020
1 parent 4280517 commit 93aabfd
Show file tree
Hide file tree
Showing 52 changed files with 884 additions and 2,603 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\EFCore.Cassandra\EFCore.Cassandra.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion samples/EFCore.Cassandra.Samples/FakeDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.ForCassandraSetClusterColumns(s => new { s.LastName });
modelBuilder.Entity<Applicant>()
.Property(p => p.TimeUuid)
.HasConversion(timeUuidConverter);
.HasConversion(new TimeUuidToGuidConverter());
modelBuilder.Entity<Applicant>()
.Property(p => p.Id)
.HasColumnName("id");
Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace EFCore.Cassandra.Samples.Migrations
{
public partial class InitialCreate : Migration
public partial class Init : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,70 @@ protected override void BuildModel(ModelBuilder modelBuilder)
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Cassandra:Keyspacecv", "{\"ReplicationFactor\":2,\"ReplicationClass\":0}")
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079");
.HasAnnotation("ProductVersion", "3.1.4");

modelBuilder.Entity("EFCore.Cassandra.Samples.Models.Applicant", b =>
{
b.Property<Guid>("Id")
.HasColumnName("id");
.HasColumnName("id")
.HasColumnType("uuid");
b.Property<string>("LastName");
b.Property<string>("LastName")
.HasColumnType("text");
b.Property<BigInteger>("BigInteger");
b.Property<BigInteger>("BigInteger")
.HasColumnType("varint");
b.Property<byte[]>("Blob");
b.Property<byte[]>("Blob")
.HasColumnType("blob");
b.Property<bool>("Bool");
b.Property<bool>("Bool")
.HasColumnType("boolean");
b.Property<DateTimeOffset>("DateTimeOffset");
b.Property<DateTimeOffset>("DateTimeOffset")
.HasColumnType("timestamp");
b.Property<decimal>("Decimal");
b.Property<decimal>("Decimal")
.HasColumnType("decimal");
b.Property<IDictionary<string, string>>("Dic");
b.Property<IDictionary<string, string>>("Dic")
.HasColumnType("map<text,text>");
b.Property<double>("Double");
b.Property<double>("Double")
.HasColumnType("double");
b.Property<float>("Float");
b.Property<float>("Float")
.HasColumnType("float");
b.Property<int>("Integer");
b.Property<int>("Integer")
.HasColumnType("int");
b.Property<IPAddress>("Ip");
b.Property<IPAddress>("Ip")
.HasColumnType("inet");
b.Property<LocalDate>("LocalDate");
b.Property<LocalDate>("LocalDate")
.HasColumnType("date");
b.Property<LocalTime>("LocalTime");
b.Property<LocalTime>("LocalTime")
.HasColumnType("time");
b.Property<long>("Long");
b.Property<long>("Long")
.HasColumnType("bigint");
b.Property<IList<string>>("Lst");
b.Property<IList<string>>("Lst")
.HasColumnType("list<text>");
b.Property<IList<int>>("LstInt");
b.Property<IList<int>>("LstInt")
.HasColumnType("list<int>");
b.Property<sbyte>("Sbyte");
b.Property<sbyte>("Sbyte")
.HasColumnType("tinyint");
b.Property<short>("SmallInt");
b.Property<short>("SmallInt")
.HasColumnType("smallint");
b.Property<Guid>("TimeUuid")
.HasConversion(new ValueConverter<Guid, Guid>(v => default(Guid), v => default(Guid), new ConverterMappingHints(size: 36)));
.HasColumnType("uuid");
b.HasKey("Id", "LastName");
Expand All @@ -75,9 +94,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
modelBuilder.Entity("EFCore.Cassandra.Samples.Models.CV", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Name");
b.Property<string>("Name")
.HasColumnType("text");
b.HasKey("Id");
Expand Down
2 changes: 2 additions & 0 deletions samples/EFCore.Cassandra.Samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ static void Main(string[] args)
dbContext.Applicants.Add(BuildApplicant());
dbContext.SaveChanges();

var appls = dbContext.Applicants.ToList();

Console.WriteLine($"Number of applicants : {dbContext.Applicants.LongCount()}");

Console.WriteLine("Update the applicant");
Expand Down
Loading

0 comments on commit 93aabfd

Please sign in to comment.