diff --git a/CleanArchitecture.sln b/CleanArchitecture.sln
index 0df7c34f7..a36379e19 100644
--- a/CleanArchitecture.sln
+++ b/CleanArchitecture.sln
@@ -29,20 +29,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "src\Web\Web.csproj", "{4E4EE20C-F06A-4A1B-851F-C5577796941C}"
EndProject
-#if (!UseApiOnly)
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.AcceptanceTests", "tests\Web.AcceptanceTests\Web.AcceptanceTests.csproj", "{21334974-6B07-47BB-B664-AC62FE58C12B}"
EndProject
-#endif
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application.FunctionalTests", "tests\Application.FunctionalTests\Application.FunctionalTests.csproj", "{EA6127A5-94C9-4C31-AD11-E6811B92B520}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.IntegrationTests", "tests\Infrastructure.IntegrationTests\Infrastructure.IntegrationTests.csproj", "{01FA6786-921D-4CE8-8C50-4FDA66C9477D}"
EndProject
-#if (UseAspire)
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppHost", "src\AppHost\AppHost.csproj", "{36483B25-E165-46F3-AA1C-ADE75A46BD8E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceDefaults", "src\ServiceDefaults\ServiceDefaults.csproj", "{15AFAC17-7E6E-4DB9-A5D9-EA96C5287CD2}"
EndProject
-#endif
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -73,12 +69,10 @@ Global
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Release|Any CPU.Build.0 = Release|Any CPU
-#if (!UseApiOnly)
{21334974-6B07-47BB-B664-AC62FE58C12B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Release|Any CPU.Build.0 = Release|Any CPU
-#endif
{EA6127A5-94C9-4C31-AD11-E6811B92B520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA6127A5-94C9-4C31-AD11-E6811B92B520}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA6127A5-94C9-4C31-AD11-E6811B92B520}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -87,7 +81,6 @@ Global
{01FA6786-921D-4CE8-8C50-4FDA66C9477D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01FA6786-921D-4CE8-8C50-4FDA66C9477D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01FA6786-921D-4CE8-8C50-4FDA66C9477D}.Release|Any CPU.Build.0 = Release|Any CPU
- #if (UseAspire)
{36483B25-E165-46F3-AA1C-ADE75A46BD8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36483B25-E165-46F3-AA1C-ADE75A46BD8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36483B25-E165-46F3-AA1C-ADE75A46BD8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -96,7 +89,6 @@ Global
{15AFAC17-7E6E-4DB9-A5D9-EA96C5287CD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15AFAC17-7E6E-4DB9-A5D9-EA96C5287CD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15AFAC17-7E6E-4DB9-A5D9-EA96C5287CD2}.Release|Any CPU.Build.0 = Release|Any CPU
- #endif
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -108,15 +100,11 @@ Global
{DEFF4009-1FAB-4392-80B6-707E2DC5C00B} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{DC37FD87-552C-4613-9F16-1537CA522898} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{4E4EE20C-F06A-4A1B-851F-C5577796941C} = {6ED356A7-8B47-4613-AD01-C85CF28491BD}
- #if (!UseApiOnly)
{21334974-6B07-47BB-B664-AC62FE58C12B} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
- #endif
{EA6127A5-94C9-4C31-AD11-E6811B92B520} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{01FA6786-921D-4CE8-8C50-4FDA66C9477D} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
- #if (UseAspire)
{36483B25-E165-46F3-AA1C-ADE75A46BD8E} = {6ED356A7-8B47-4613-AD01-C85CF28491BD}
{15AFAC17-7E6E-4DB9-A5D9-EA96C5287CD2} = {6ED356A7-8B47-4613-AD01-C85CF28491BD}
- #endif
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3CB609D9-5D54-4C11-A371-DAAC8B74E430}
diff --git a/Directory.Build.props b/Directory.Build.props
index a1b539c9a..44538eb4a 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -7,5 +7,6 @@
enable
enable
+ $(DefineConstants);UseApiOnly
\ No newline at end of file
diff --git a/Directory.Packages.props b/Directory.Packages.props
index dd66fcb3b..66ef98634 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -18,6 +18,7 @@
+
@@ -49,6 +50,7 @@
+
@@ -65,8 +67,6 @@
-
-
diff --git a/src/Infrastructure/Data/Migrations/00000000000000_InitialCreate.Designer.cs b/src/Infrastructure/Data/Migrations/00000000000000_InitialCreate.Designer.cs
index ce6636fe6..a13266ad0 100644
--- a/src/Infrastructure/Data/Migrations/00000000000000_InitialCreate.Designer.cs
+++ b/src/Infrastructure/Data/Migrations/00000000000000_InitialCreate.Designer.cs
@@ -26,390 +26,369 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder)
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("CleanArchitecture.Domain.Entities.TodoItem", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
- b.Property("Created")
- .HasColumnType("datetimeoffset");
+ b.Property("Created")
+ .HasColumnType("datetimeoffset");
- b.Property("CreatedBy")
- .HasColumnType("nvarchar(max)");
+ b.Property("CreatedBy")
+ .HasColumnType("nvarchar(max)");
- b.Property("Done")
- .HasColumnType("bit");
+ b.Property("Done")
+ .HasColumnType("bit");
- b.Property("LastModified")
- .HasColumnType("datetimeoffset");
+ b.Property("LastModified")
+ .HasColumnType("datetimeoffset");
- b.Property("LastModifiedBy")
- .HasColumnType("nvarchar(max)");
+ b.Property("LastModifiedBy")
+ .HasColumnType("nvarchar(max)");
- b.Property("ListId")
- .HasColumnType("int");
+ b.Property("ListId")
+ .HasColumnType("int");
- b.Property("Note")
- .HasColumnType("nvarchar(max)");
+ b.Property("Note")
+ .HasColumnType("nvarchar(max)");
- b.Property("Priority")
- .HasColumnType("int");
+ b.Property("Priority")
+ .HasColumnType("int");
- b.Property("Reminder")
- .HasColumnType("datetime2");
+ b.Property("Reminder")
+ .HasColumnType("datetime2");
- b.Property("Title")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("ListId");
+ b.HasIndex("ListId");
- b.ToTable("TodoItems");
- });
+ b.ToTable("TodoItems");
+ });
modelBuilder.Entity("CleanArchitecture.Domain.Entities.TodoList", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
- b.Property("Created")
- .HasColumnType("datetimeoffset");
+ b.Property("Created")
+ .HasColumnType("datetimeoffset");
- b.Property("CreatedBy")
- .HasColumnType("nvarchar(max)");
+ b.Property("CreatedBy")
+ .HasColumnType("nvarchar(max)");
- b.Property("LastModified")
- .HasColumnType("datetimeoffset");
+ b.Property("LastModified")
+ .HasColumnType("datetimeoffset");
- b.Property("LastModifiedBy")
- .HasColumnType("nvarchar(max)");
+ b.Property("LastModifiedBy")
+ .HasColumnType("nvarchar(max)");
- b.Property("Title")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.ToTable("TodoLists");
- });
+ b.ToTable("TodoLists");
+ });
modelBuilder.Entity("CleanArchitecture.Infrastructure.Identity.ApplicationUser", b =>
- {
- b.Property("Id")
- .HasColumnType("nvarchar(450)");
+ {
+ b.Property("Id")
+ .HasColumnType("nvarchar(450)");
- b.Property("AccessFailedCount")
- .HasColumnType("int");
+ b.Property("AccessFailedCount")
+ .HasColumnType("int");
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("nvarchar(max)");
- b.Property("Email")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.Property("EmailConfirmed")
- .HasColumnType("bit");
+ b.Property("EmailConfirmed")
+ .HasColumnType("bit");
- b.Property("LockoutEnabled")
- .HasColumnType("bit");
+ b.Property("LockoutEnabled")
+ .HasColumnType("bit");
- b.Property("LockoutEnd")
- .HasColumnType("datetimeoffset");
+ b.Property("LockoutEnd")
+ .HasColumnType("datetimeoffset");
- b.Property("NormalizedEmail")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.Property("NormalizedUserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.Property("PasswordHash")
- .HasColumnType("nvarchar(max)");
+ b.Property("PasswordHash")
+ .HasColumnType("nvarchar(max)");
- b.Property("PhoneNumber")
- .HasColumnType("nvarchar(max)");
+ b.Property("PhoneNumber")
+ .HasColumnType("nvarchar(max)");
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("bit");
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("bit");
- b.Property("SecurityStamp")
- .HasColumnType("nvarchar(max)");
+ b.Property("SecurityStamp")
+ .HasColumnType("nvarchar(max)");
- b.Property("TwoFactorEnabled")
- .HasColumnType("bit");
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("bit");
- b.Property("UserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("NormalizedEmail")
- .HasDatabaseName("EmailIndex");
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasDatabaseName("UserNameIndex")
- .HasFilter("[NormalizedUserName] IS NOT NULL");
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex")
+ .HasFilter("[NormalizedUserName] IS NOT NULL");
- b.ToTable("AspNetUsers", (string)null);
- });
+ b.ToTable("AspNetUsers", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
- {
- b.Property("Id")
- .HasColumnType("nvarchar(450)");
+ {
+ b.Property("Id")
+ .HasColumnType("nvarchar(450)");
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("nvarchar(max)");
- b.Property("Name")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("Name")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.Property("NormalizedName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasDatabaseName("RoleNameIndex")
- .HasFilter("[NormalizedName] IS NOT NULL");
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex")
+ .HasFilter("[NormalizedName] IS NOT NULL");
- b.ToTable("AspNetRoles", (string)null);
- });
+ b.ToTable("AspNetRoles", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
+ b.Property("ClaimType")
+ .HasColumnType("nvarchar(max)");
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(max)");
- b.Property("RoleId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("RoleId");
+ b.HasIndex("RoleId");
- b.ToTable("AspNetRoleClaims", (string)null);
- });
+ b.ToTable("AspNetRoleClaims", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
+ b.Property("ClaimType")
+ .HasColumnType("nvarchar(max)");
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(max)");
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("UserId");
+ b.HasIndex("UserId");
- b.ToTable("AspNetUserClaims", (string)null);
- });
+ b.ToTable("AspNetUserClaims", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
-#if (UseApiOnly && UseSqlServer)
- .HasColumnType("nvarchar(450)");
-#else
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-#endif
-
+ {
+ b.Property("LoginProvider")
+ .HasColumnType("nvarchar(450)");
- b.Property("ProviderKey")
-#if (UseApiOnly && UseSqlServer)
- .HasColumnType("nvarchar(450)");
-#else
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-#endif
+ b.Property("ProviderKey")
+ .HasColumnType("nvarchar(450)");
- b.Property("ProviderDisplayName")
- .HasColumnType("nvarchar(max)");
+ b.Property("ProviderDisplayName")
+ .HasColumnType("nvarchar(max)");
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
- b.HasKey("LoginProvider", "ProviderKey");
+ b.HasKey("LoginProvider", "ProviderKey");
- b.HasIndex("UserId");
+ b.HasIndex("UserId");
- b.ToTable("AspNetUserLogins", (string)null);
- });
+ b.ToTable("AspNetUserLogins", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("nvarchar(450)");
+ {
+ b.Property("UserId")
+ .HasColumnType("nvarchar(450)");
- b.Property("RoleId")
- .HasColumnType("nvarchar(450)");
+ b.Property("RoleId")
+ .HasColumnType("nvarchar(450)");
- b.HasKey("UserId", "RoleId");
+ b.HasKey("UserId", "RoleId");
- b.HasIndex("RoleId");
+ b.HasIndex("RoleId");
- b.ToTable("AspNetUserRoles", (string)null);
- });
+ b.ToTable("AspNetUserRoles", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.Property("UserId")
- .HasColumnType("nvarchar(450)");
-
- b.Property("LoginProvider")
-#if (UseApiOnly && UseSqlServer)
- .HasColumnType("nvarchar(450)");
-#else
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-#endif
-
- b.Property("Name")
-#if (UseApiOnly && UseSqlServer)
- .HasColumnType("nvarchar(450)");
-#else
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-#endif
-
- b.Property("Value")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("UserId", "LoginProvider", "Name");
-
- b.ToTable("AspNetUserTokens", (string)null);
- });
+ {
+ b.Property("UserId")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("LoginProvider")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Name")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens", (string)null);
+ });
modelBuilder.Entity("CleanArchitecture.Domain.Entities.TodoItem", b =>
- {
- b.HasOne("CleanArchitecture.Domain.Entities.TodoList", "List")
- .WithMany("Items")
- .HasForeignKey("ListId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
+ {
+ b.HasOne("CleanArchitecture.Domain.Entities.TodoList", "List")
+ .WithMany("Items")
+ .HasForeignKey("ListId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
- b.Navigation("List");
- });
+ b.Navigation("List");
+ });
modelBuilder.Entity("CleanArchitecture.Domain.Entities.TodoList", b =>
- {
- b.OwnsOne("CleanArchitecture.Domain.ValueObjects.Colour", "Colour", b1 =>
{
- b1.Property("TodoListId")
- .HasColumnType("int");
+ b.OwnsOne("CleanArchitecture.Domain.ValueObjects.Colour", "Colour", b1 =>
+ {
+ b1.Property("TodoListId")
+ .HasColumnType("int");
- b1.Property("Code")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
+ b1.Property("Code")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
- b1.HasKey("TodoListId");
+ b1.HasKey("TodoListId");
- b1.ToTable("TodoLists");
+ b1.ToTable("TodoLists");
- b1.WithOwner()
- .HasForeignKey("TodoListId");
- });
+ b1.WithOwner()
+ .HasForeignKey("TodoListId");
+ });
- b.Navigation("Colour")
- .IsRequired();
- });
+ b.Navigation("Colour")
+ .IsRequired();
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
+ {
+ b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.HasOne("CleanArchitecture.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
+ {
+ b.HasOne("CleanArchitecture.Infrastructure.Identity.ApplicationUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.HasOne("CleanArchitecture.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
+ {
+ b.HasOne("CleanArchitecture.Infrastructure.Identity.ApplicationUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("CleanArchitecture.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
+ {
+ b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CleanArchitecture.Infrastructure.Identity.ApplicationUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.HasOne("CleanArchitecture.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
+ {
+ b.HasOne("CleanArchitecture.Infrastructure.Identity.ApplicationUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
modelBuilder.Entity("CleanArchitecture.Domain.Entities.TodoList", b =>
- {
- b.Navigation("Items");
- });
+ {
+ b.Navigation("Items");
+ });
#pragma warning restore 612, 618
}
}
diff --git a/src/Infrastructure/Data/Migrations/00000000000000_InitialCreate.cs b/src/Infrastructure/Data/Migrations/00000000000000_InitialCreate.cs
index 181cc7536..9ed966f85 100644
--- a/src/Infrastructure/Data/Migrations/00000000000000_InitialCreate.cs
+++ b/src/Infrastructure/Data/Migrations/00000000000000_InitialCreate.cs
@@ -113,14 +113,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
migrationBuilder.CreateTable(
name: "AspNetUserLogins",
columns: table => new
- {
-#if (UseApiOnly && UseSqlServer)
+ {
LoginProvider = table.Column(type: "nvarchar(450)", nullable: false),
- ProviderKey = table.Column(type: "nvarchar(450)", nullable: false),
-#else
- LoginProvider = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false),
- ProviderKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false),
-#endif
+ ProviderKey = table.Column(type: "nvarchar(450)", nullable: false),
ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true),
UserId = table.Column(type: "nvarchar(450)", nullable: false)
},
@@ -163,14 +158,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
name: "AspNetUserTokens",
columns: table => new
{
- UserId = table.Column(type: "nvarchar(450)", nullable: false),
-#if (UseApiOnly && UseSqlServer)
+ UserId = table.Column(type: "nvarchar(450)", nullable: false),
LoginProvider = table.Column(type: "nvarchar(450)", nullable: false),
- Name = table.Column(type: "nvarchar(450)", nullable: false),
-#else
- LoginProvider = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false),
- Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false),
-#endif
+ Name = table.Column(type: "nvarchar(450)", nullable: false),
Value = table.Column(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
diff --git a/src/Infrastructure/Data/Migrations/ApplicationDbContextModelSnapshot.cs b/src/Infrastructure/Data/Migrations/ApplicationDbContextModelSnapshot.cs
index 5e6d67a7d..823b80347 100644
--- a/src/Infrastructure/Data/Migrations/ApplicationDbContextModelSnapshot.cs
+++ b/src/Infrastructure/Data/Migrations/ApplicationDbContextModelSnapshot.cs
@@ -23,389 +23,369 @@ protected override void BuildModel(ModelBuilder modelBuilder)
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("CleanArchitecture.Domain.Entities.TodoItem", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
- b.Property("Created")
- .HasColumnType("datetimeoffset");
+ b.Property("Created")
+ .HasColumnType("datetimeoffset");
- b.Property("CreatedBy")
- .HasColumnType("nvarchar(max)");
+ b.Property("CreatedBy")
+ .HasColumnType("nvarchar(max)");
- b.Property("Done")
- .HasColumnType("bit");
+ b.Property("Done")
+ .HasColumnType("bit");
- b.Property("LastModified")
- .HasColumnType("datetimeoffset");
+ b.Property("LastModified")
+ .HasColumnType("datetimeoffset");
- b.Property("LastModifiedBy")
- .HasColumnType("nvarchar(max)");
+ b.Property("LastModifiedBy")
+ .HasColumnType("nvarchar(max)");
- b.Property("ListId")
- .HasColumnType("int");
+ b.Property("ListId")
+ .HasColumnType("int");
- b.Property("Note")
- .HasColumnType("nvarchar(max)");
+ b.Property("Note")
+ .HasColumnType("nvarchar(max)");
- b.Property("Priority")
- .HasColumnType("int");
+ b.Property("Priority")
+ .HasColumnType("int");
- b.Property("Reminder")
- .HasColumnType("datetime2");
+ b.Property("Reminder")
+ .HasColumnType("datetime2");
- b.Property("Title")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("ListId");
+ b.HasIndex("ListId");
- b.ToTable("TodoItems");
- });
+ b.ToTable("TodoItems");
+ });
modelBuilder.Entity("CleanArchitecture.Domain.Entities.TodoList", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
- b.Property("Created")
- .HasColumnType("datetimeoffset");
+ b.Property("Created")
+ .HasColumnType("datetimeoffset");
- b.Property("CreatedBy")
- .HasColumnType("nvarchar(max)");
+ b.Property("CreatedBy")
+ .HasColumnType("nvarchar(max)");
- b.Property("LastModified")
- .HasColumnType("datetimeoffset");
+ b.Property("LastModified")
+ .HasColumnType("datetimeoffset");
- b.Property("LastModifiedBy")
- .HasColumnType("nvarchar(max)");
+ b.Property("LastModifiedBy")
+ .HasColumnType("nvarchar(max)");
- b.Property("Title")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.ToTable("TodoLists");
- });
+ b.ToTable("TodoLists");
+ });
modelBuilder.Entity("CleanArchitecture.Infrastructure.Identity.ApplicationUser", b =>
- {
- b.Property("Id")
- .HasColumnType("nvarchar(450)");
+ {
+ b.Property("Id")
+ .HasColumnType("nvarchar(450)");
- b.Property("AccessFailedCount")
- .HasColumnType("int");
+ b.Property("AccessFailedCount")
+ .HasColumnType("int");
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("nvarchar(max)");
- b.Property("Email")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.Property("EmailConfirmed")
- .HasColumnType("bit");
+ b.Property("EmailConfirmed")
+ .HasColumnType("bit");
- b.Property("LockoutEnabled")
- .HasColumnType("bit");
+ b.Property("LockoutEnabled")
+ .HasColumnType("bit");
- b.Property("LockoutEnd")
- .HasColumnType("datetimeoffset");
+ b.Property("LockoutEnd")
+ .HasColumnType("datetimeoffset");
- b.Property("NormalizedEmail")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.Property("NormalizedUserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.Property("PasswordHash")
- .HasColumnType("nvarchar(max)");
+ b.Property("PasswordHash")
+ .HasColumnType("nvarchar(max)");
- b.Property("PhoneNumber")
- .HasColumnType("nvarchar(max)");
+ b.Property("PhoneNumber")
+ .HasColumnType("nvarchar(max)");
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("bit");
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("bit");
- b.Property("SecurityStamp")
- .HasColumnType("nvarchar(max)");
+ b.Property("SecurityStamp")
+ .HasColumnType("nvarchar(max)");
- b.Property("TwoFactorEnabled")
- .HasColumnType("bit");
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("bit");
- b.Property("UserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("NormalizedEmail")
- .HasDatabaseName("EmailIndex");
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasDatabaseName("UserNameIndex")
- .HasFilter("[NormalizedUserName] IS NOT NULL");
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex")
+ .HasFilter("[NormalizedUserName] IS NOT NULL");
- b.ToTable("AspNetUsers", (string)null);
- });
+ b.ToTable("AspNetUsers", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
- {
- b.Property("Id")
- .HasColumnType("nvarchar(450)");
+ {
+ b.Property("Id")
+ .HasColumnType("nvarchar(450)");
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("nvarchar(max)");
- b.Property("Name")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("Name")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.Property("NormalizedName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
+ b.Property("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasDatabaseName("RoleNameIndex")
- .HasFilter("[NormalizedName] IS NOT NULL");
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex")
+ .HasFilter("[NormalizedName] IS NOT NULL");
- b.ToTable("AspNetRoles", (string)null);
- });
+ b.ToTable("AspNetRoles", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
+ b.Property("ClaimType")
+ .HasColumnType("nvarchar(max)");
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(max)");
- b.Property("RoleId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("RoleId");
+ b.HasIndex("RoleId");
- b.ToTable("AspNetRoleClaims", (string)null);
- });
+ b.ToTable("AspNetRoleClaims", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
+ b.Property("ClaimType")
+ .HasColumnType("nvarchar(max)");
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
+ b.Property("ClaimValue")
+ .HasColumnType("nvarchar(max)");
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("UserId");
+ b.HasIndex("UserId");
- b.ToTable("AspNetUserClaims", (string)null);
- });
+ b.ToTable("AspNetUserClaims", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
-#if (UseApiOnly && UseSqlServer)
- .HasColumnType("nvarchar(450)");
-#else
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-#endif
+ {
+ b.Property("LoginProvider")
+ .HasColumnType("nvarchar(450)");
- b.Property("ProviderKey")
-#if (UseApiOnly && UseSqlServer)
- .HasColumnType("nvarchar(450)");
-#else
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-#endif
+ b.Property("ProviderKey")
+ .HasColumnType("nvarchar(450)");
- b.Property("ProviderDisplayName")
- .HasColumnType("nvarchar(max)");
+ b.Property("ProviderDisplayName")
+ .HasColumnType("nvarchar(max)");
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
- b.HasKey("LoginProvider", "ProviderKey");
+ b.HasKey("LoginProvider", "ProviderKey");
- b.HasIndex("UserId");
+ b.HasIndex("UserId");
- b.ToTable("AspNetUserLogins", (string)null);
- });
+ b.ToTable("AspNetUserLogins", (string)null);
+ });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("nvarchar(450)");
+ {
+ b.Property