mirror of
https://github.com/Biarity/Sieve.git
synced 2025-11-06 11:45:27 +01:00
* Migrate tests to xunit
* Update sample project to dotnetcore3.1 * Use Sqlite in sample project to run it everywhere * Fix: Filter with escaped comma * Fix: Filter "null" does not work with Contains or StartsWith * Code cleanup: Adjust namespaces, adjust usings
This commit is contained in:
52
Sieve.Sample/Migrations/20210513114647_Initial.Designer.cs
generated
Normal file
52
Sieve.Sample/Migrations/20210513114647_Initial.Designer.cs
generated
Normal file
@@ -0,0 +1,52 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Sieve.Sample.Entities;
|
||||
|
||||
namespace Sieve.Sample.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20210513114647_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.14");
|
||||
|
||||
modelBuilder.Entity("Sieve.Sample.Entities.Post", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CommentCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTimeOffset>("DateCreated")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("DateLastViewed")
|
||||
.HasColumnType("datetime");
|
||||
|
||||
b.Property<int>("LikeCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Posts");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Sieve.Sample/Migrations/20210513114647_Initial.cs
Normal file
35
Sieve.Sample/Migrations/20210513114647_Initial.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Sieve.Sample.Migrations
|
||||
{
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Posts",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Title = table.Column<string>(nullable: true),
|
||||
LikeCount = table.Column<int>(nullable: false),
|
||||
CommentCount = table.Column<int>(nullable: false),
|
||||
DateCreated = table.Column<DateTimeOffset>(nullable: false),
|
||||
DateLastViewed = table.Column<DateTime>(type: "datetime", nullable: false),
|
||||
CategoryId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Posts", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Posts");
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Sieve.Sample/Migrations/ApplicationDbContextModelSnapshot.cs
Normal file
50
Sieve.Sample/Migrations/ApplicationDbContextModelSnapshot.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Sieve.Sample.Entities;
|
||||
|
||||
namespace Sieve.Sample.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.14");
|
||||
|
||||
modelBuilder.Entity("Sieve.Sample.Entities.Post", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CommentCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTimeOffset>("DateCreated")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("DateLastViewed")
|
||||
.HasColumnType("datetime");
|
||||
|
||||
b.Property<int>("LikeCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Posts");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user