diff --git a/api/FilterLists.Data/FilterLists.Data.csproj b/api/FilterLists.Data/FilterLists.Data.csproj
index 576b1c4f2..62c366235 100644
--- a/api/FilterLists.Data/FilterLists.Data.csproj
+++ b/api/FilterLists.Data/FilterLists.Data.csproj
@@ -5,6 +5,7 @@
+
diff --git a/api/FilterLists.Data/Migrations/20170409192934_FilterListsMigration.Designer.cs b/api/FilterLists.Data/Migrations/20170409192934_FilterListsMigration.Designer.cs
new file mode 100644
index 000000000..fc004f869
--- /dev/null
+++ b/api/FilterLists.Data/Migrations/20170409192934_FilterListsMigration.Designer.cs
@@ -0,0 +1,52 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using FilterLists.Data.Contexts;
+
+namespace FilterLists.Data.Migrations
+{
+ [DbContext(typeof(FilterListsDbContext))]
+ [Migration("20170409192934_FilterListsMigration")]
+ partial class FilterListsMigration
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .HasAnnotation("ProductVersion", "1.1.1");
+
+ modelBuilder.Entity("FilterLists.Models.List", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AddedDate");
+
+ b.Property("Description");
+
+ b.Property("DescriptionSourceUrl");
+
+ b.Property("DonateUrl");
+
+ b.Property("Email");
+
+ b.Property("ForumUrl");
+
+ b.Property("HomeUrl");
+
+ b.Property("IssuesUrl");
+
+ b.Property("ModifiedDate");
+
+ b.Property("Name");
+
+ b.Property("ViewUrl");
+
+ b.HasKey("Id");
+
+ b.ToTable("List");
+ });
+ }
+ }
+}
diff --git a/api/FilterLists.Data/Migrations/20170409192934_FilterListsMigration.cs b/api/FilterLists.Data/Migrations/20170409192934_FilterListsMigration.cs
new file mode 100644
index 000000000..7e1cd9289
--- /dev/null
+++ b/api/FilterLists.Data/Migrations/20170409192934_FilterListsMigration.cs
@@ -0,0 +1,37 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace FilterLists.Data.Migrations
+{
+ public partial class FilterListsMigration : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ "List",
+ table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("MySQL:AutoIncrement", true),
+ AddedDate = table.Column(nullable: false),
+ Description = table.Column(nullable: true),
+ DescriptionSourceUrl = table.Column(nullable: true),
+ DonateUrl = table.Column(nullable: true),
+ Email = table.Column(nullable: true),
+ ForumUrl = table.Column(nullable: true),
+ HomeUrl = table.Column(nullable: true),
+ IssuesUrl = table.Column(nullable: true),
+ ModifiedDate = table.Column(nullable: false),
+ Name = table.Column(nullable: true),
+ ViewUrl = table.Column(nullable: true)
+ },
+ constraints: table => { table.PrimaryKey("PK_List", x => x.Id); });
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ "List");
+ }
+ }
+}
\ No newline at end of file
diff --git a/api/FilterLists.Data/Migrations/FilterListsDbContextModelSnapshot.cs b/api/FilterLists.Data/Migrations/FilterListsDbContextModelSnapshot.cs
new file mode 100644
index 000000000..79b648ef6
--- /dev/null
+++ b/api/FilterLists.Data/Migrations/FilterListsDbContextModelSnapshot.cs
@@ -0,0 +1,51 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using FilterLists.Data.Contexts;
+
+namespace FilterLists.Data.Migrations
+{
+ [DbContext(typeof(FilterListsDbContext))]
+ partial class FilterListsDbContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .HasAnnotation("ProductVersion", "1.1.1");
+
+ modelBuilder.Entity("FilterLists.Models.List", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AddedDate");
+
+ b.Property("Description");
+
+ b.Property("DescriptionSourceUrl");
+
+ b.Property("DonateUrl");
+
+ b.Property("Email");
+
+ b.Property("ForumUrl");
+
+ b.Property("HomeUrl");
+
+ b.Property("IssuesUrl");
+
+ b.Property("ModifiedDate");
+
+ b.Property("Name");
+
+ b.Property("ViewUrl");
+
+ b.HasKey("Id");
+
+ b.ToTable("List");
+ });
+ }
+ }
+}
diff --git a/api/FilterLists.Models/BaseEntity.cs b/api/FilterLists.Models/BaseEntity.cs
index 082674a15..5ce0c2726 100644
--- a/api/FilterLists.Models/BaseEntity.cs
+++ b/api/FilterLists.Models/BaseEntity.cs
@@ -1,15 +1,11 @@
//https://code.msdn.microsoft.com/Generic-Repository-Pattern-f133bca4/sourcecode?fileId=164016&pathId=1938870460
using System;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
namespace FilterLists.Models
{
public class BaseEntity
{
- [Key]
- [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public DateTime AddedDate { get; set; }
public DateTime ModifiedDate { get; set; }