diff --git a/coffeecard/CoffeeCard.Common/Configuration/DatabaseSettings.cs b/coffeecard/CoffeeCard.Common/Configuration/DatabaseSettings.cs
index 9234e5be..00b83d24 100644
--- a/coffeecard/CoffeeCard.Common/Configuration/DatabaseSettings.cs
+++ b/coffeecard/CoffeeCard.Common/Configuration/DatabaseSettings.cs
@@ -1,5 +1,5 @@
-using System.ComponentModel.DataAnnotations;
-using NetEscapades.Configuration.Validation;
+using NetEscapades.Configuration.Validation;
+using System.ComponentModel.DataAnnotations;
namespace CoffeeCard.Common.Configuration
{
diff --git a/coffeecard/CoffeeCard.Common/Configuration/EnvironmentSettings.cs b/coffeecard/CoffeeCard.Common/Configuration/EnvironmentSettings.cs
index 5741fdd2..94dcc38c 100644
--- a/coffeecard/CoffeeCard.Common/Configuration/EnvironmentSettings.cs
+++ b/coffeecard/CoffeeCard.Common/Configuration/EnvironmentSettings.cs
@@ -1,5 +1,5 @@
-using System.ComponentModel.DataAnnotations;
-using NetEscapades.Configuration.Validation;
+using NetEscapades.Configuration.Validation;
+using System.ComponentModel.DataAnnotations;
namespace CoffeeCard.Common.Configuration
{
diff --git a/coffeecard/CoffeeCard.Common/Configuration/IdentitySettings.cs b/coffeecard/CoffeeCard.Common/Configuration/IdentitySettings.cs
index f993325a..6a736363 100644
--- a/coffeecard/CoffeeCard.Common/Configuration/IdentitySettings.cs
+++ b/coffeecard/CoffeeCard.Common/Configuration/IdentitySettings.cs
@@ -1,5 +1,5 @@
-using System.ComponentModel.DataAnnotations;
-using NetEscapades.Configuration.Validation;
+using NetEscapades.Configuration.Validation;
+using System.ComponentModel.DataAnnotations;
namespace CoffeeCard.Common.Configuration
{
diff --git a/coffeecard/CoffeeCard.Common/Configuration/LoginLimiterSettings.cs b/coffeecard/CoffeeCard.Common/Configuration/LoginLimiterSettings.cs
index 6e04ab67..d6757833 100644
--- a/coffeecard/CoffeeCard.Common/Configuration/LoginLimiterSettings.cs
+++ b/coffeecard/CoffeeCard.Common/Configuration/LoginLimiterSettings.cs
@@ -1,5 +1,5 @@
-using System.ComponentModel.DataAnnotations;
using NetEscapades.Configuration.Validation;
+using System.ComponentModel.DataAnnotations;
namespace CoffeeCard.Common.Configuration
{
diff --git a/coffeecard/CoffeeCard.Common/Configuration/MailgunSettings.cs b/coffeecard/CoffeeCard.Common/Configuration/MailgunSettings.cs
index ce71c62d..aa538f70 100644
--- a/coffeecard/CoffeeCard.Common/Configuration/MailgunSettings.cs
+++ b/coffeecard/CoffeeCard.Common/Configuration/MailgunSettings.cs
@@ -1,5 +1,5 @@
-using System.ComponentModel.DataAnnotations;
-using NetEscapades.Configuration.Validation;
+using NetEscapades.Configuration.Validation;
+using System.ComponentModel.DataAnnotations;
namespace CoffeeCard.Common.Configuration
{
diff --git a/coffeecard/CoffeeCard.Common/Configuration/MobilePaySettingsV2.cs b/coffeecard/CoffeeCard.Common/Configuration/MobilePaySettingsV2.cs
index cfa5e325..33f87379 100644
--- a/coffeecard/CoffeeCard.Common/Configuration/MobilePaySettingsV2.cs
+++ b/coffeecard/CoffeeCard.Common/Configuration/MobilePaySettingsV2.cs
@@ -1,6 +1,6 @@
-using System;
+using NetEscapades.Configuration.Validation;
+using System;
using System.ComponentModel.DataAnnotations;
-using NetEscapades.Configuration.Validation;
namespace CoffeeCard.Common.Configuration
{
diff --git a/coffeecard/CoffeeCard.Common/Errors/ConflictException.cs b/coffeecard/CoffeeCard.Common/Errors/ConflictException.cs
index 23fc2664..a3bbc2de 100644
--- a/coffeecard/CoffeeCard.Common/Errors/ConflictException.cs
+++ b/coffeecard/CoffeeCard.Common/Errors/ConflictException.cs
@@ -1,6 +1,6 @@
+using Microsoft.AspNetCore.Http;
using System;
using System.Runtime.Serialization;
-using Microsoft.AspNetCore.Http;
namespace CoffeeCard.Common.Errors
{
diff --git a/coffeecard/CoffeeCard.Common/Errors/EntityNotFoundException.cs b/coffeecard/CoffeeCard.Common/Errors/EntityNotFoundException.cs
index cdb4a1d1..158b0d59 100644
--- a/coffeecard/CoffeeCard.Common/Errors/EntityNotFoundException.cs
+++ b/coffeecard/CoffeeCard.Common/Errors/EntityNotFoundException.cs
@@ -1,6 +1,6 @@
+using Microsoft.AspNetCore.Http;
using System;
using System.Runtime.Serialization;
-using Microsoft.AspNetCore.Http;
namespace CoffeeCard.Common.Errors
{
diff --git a/coffeecard/CoffeeCard.Common/Errors/IllegalUserOperationException.cs b/coffeecard/CoffeeCard.Common/Errors/IllegalUserOperationException.cs
index 928ef1d2..e780672c 100644
--- a/coffeecard/CoffeeCard.Common/Errors/IllegalUserOperationException.cs
+++ b/coffeecard/CoffeeCard.Common/Errors/IllegalUserOperationException.cs
@@ -1,6 +1,6 @@
+using Microsoft.AspNetCore.Http;
using System;
using System.Runtime.Serialization;
-using Microsoft.AspNetCore.Http;
namespace CoffeeCard.Common.Errors
{
diff --git a/coffeecard/CoffeeCard.Generators/Builder/BuilderGenerator.cs b/coffeecard/CoffeeCard.Generators/Builder/BuilderGenerator.cs
index cf916185..ed00d727 100644
--- a/coffeecard/CoffeeCard.Generators/Builder/BuilderGenerator.cs
+++ b/coffeecard/CoffeeCard.Generators/Builder/BuilderGenerator.cs
@@ -1,7 +1,7 @@
-using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
+using System.Text;
namespace CoffeeCard.Generators.Builder;
@@ -37,7 +37,7 @@ private static bool IsSyntaxTargetForGeneration(
SyntaxNode syntaxNode,
CancellationToken cancellationToken)
{
- return syntaxNode is ClassDeclarationSyntax classDeclaration;
+ return syntaxNode is ClassDeclarationSyntax;
}
private static INamedTypeSymbol GetSemanticTargetForGeneration(GeneratorAttributeSyntaxContext context,
@@ -50,16 +50,16 @@ private string GenerateBuilderCode(INamedTypeSymbol typeSymbol, ITypeSymbol enti
{
var codeBuilder = new StringBuilder();
- codeBuilder.AppendLine("// ");
- codeBuilder.AppendLine("using System;");
- codeBuilder.AppendLine("using AutoBogus.Conventions;");
- codeBuilder.AppendLine($"using {entity.ContainingNamespace};");
- codeBuilder.AppendLine();
- codeBuilder.AppendLine($"namespace {typeSymbol.ContainingNamespace};");
- codeBuilder.AppendLine();
+ _ = codeBuilder.AppendLine("// ");
+ _ = codeBuilder.AppendLine("using System;");
+ _ = codeBuilder.AppendLine("using AutoBogus.Conventions;");
+ _ = codeBuilder.AppendLine($"using {entity.ContainingNamespace};");
+ _ = codeBuilder.AppendLine();
+ _ = codeBuilder.AppendLine($"namespace {typeSymbol.ContainingNamespace};");
+ _ = codeBuilder.AppendLine();
- codeBuilder.AppendLine($"public partial class {typeSymbol.Name} : BaseBuilder<{entity.Name}>, IBuilder<{typeSymbol.Name}>");
- codeBuilder.AppendLine("{");
+ _ = codeBuilder.AppendLine($"public partial class {typeSymbol.Name} : BaseBuilder<{entity.Name}>, IBuilder<{typeSymbol.Name}>");
+ _ = codeBuilder.AppendLine("{");
// Retrieve all properties of the given entity
var properties = entity.GetMembers().OfType().Where(p => p.Kind == SymbolKind.Property);
@@ -71,7 +71,7 @@ private string GenerateBuilderCode(INamedTypeSymbol typeSymbol, ITypeSymbol enti
{
if (property.Name.Contains("Id"))
{
- configBuilder.AppendLine($" .WithSkip<{entity.Name}>(\"{property.Name}\")");
+ _ = configBuilder.AppendLine($" .WithSkip<{entity.Name}>(\"{property.Name}\")");
}
AddWithPropertyValueToCodeBuilder(codeBuilder: codeBuilder,
typeSymbol: typeSymbol,
@@ -87,7 +87,7 @@ private string GenerateBuilderCode(INamedTypeSymbol typeSymbol, ITypeSymbol enti
AddPrivateConstructorToCodeBuilder(codeBuilder, typeSymbol, configBuilder);
// End class
- codeBuilder.AppendLine("}");
+ _ = codeBuilder.AppendLine("}");
return codeBuilder.ToString();
}
@@ -100,35 +100,35 @@ private string GenerateBuilderCode(INamedTypeSymbol typeSymbol, ITypeSymbol enti
///
private void AddPrivateConstructorToCodeBuilder(StringBuilder codeBuilder, ITypeSymbol typeSymbol, StringBuilder configBuilder)
{
- codeBuilder.AppendLine(
+ _ = codeBuilder.AppendLine(
$" private {typeSymbol.Name} ()");
- codeBuilder.AppendLine(" {");
- codeBuilder.AppendLine(" Faker.Configure(builder => builder");
- codeBuilder.Append($"{configBuilder}");
- codeBuilder.AppendLine(" .WithConventions());");
- codeBuilder.AppendLine(" }");
+ _ = codeBuilder.AppendLine(" {");
+ _ = codeBuilder.AppendLine(" Faker.Configure(builder => builder");
+ _ = codeBuilder.Append($"{configBuilder}");
+ _ = codeBuilder.AppendLine(" .WithConventions());");
+ _ = codeBuilder.AppendLine(" }");
}
private void AddWithPropertyValueToCodeBuilder(StringBuilder codeBuilder, ITypeSymbol typeSymbol, IPropertySymbol property, char entityNameChar)
{
- codeBuilder.AppendLine(
+ _ = codeBuilder.AppendLine(
$" public {typeSymbol.Name} With{property.Name}({property.Type} {property.Name}Value)");
- codeBuilder.AppendLine(" {");
+ _ = codeBuilder.AppendLine(" {");
- codeBuilder.AppendLine(
+ _ = codeBuilder.AppendLine(
$" Faker.RuleFor({entityNameChar} => {entityNameChar}.{property.Name}, {property.Name}Value);");
- codeBuilder.AppendLine(" return this;");
- codeBuilder.AppendLine(" }");
+ _ = codeBuilder.AppendLine(" return this;");
+ _ = codeBuilder.AppendLine(" }");
}
private void AddWithPropertySetterToCodeBuilder(StringBuilder codeBuilder, ITypeSymbol typeSymbol, IPropertySymbol property, char entityNameChar)
{
- codeBuilder.AppendLine(
+ _ = codeBuilder.AppendLine(
$" public {typeSymbol.Name} With{property.Name}(Func {property.Name}Setter)");
- codeBuilder.AppendLine(" {");
+ _ = codeBuilder.AppendLine(" {");
- codeBuilder.AppendLine(
+ _ = codeBuilder.AppendLine(
$" Faker.RuleFor({entityNameChar} => {entityNameChar}.{property.Name}, {property.Name}Setter);");
- codeBuilder.AppendLine(" return this;");
- codeBuilder.AppendLine(" }");
+ _ = codeBuilder.AppendLine(" return this;");
+ _ = codeBuilder.AppendLine(" }");
}
}
\ No newline at end of file
diff --git a/coffeecard/CoffeeCard.Library/CoffeeCard.Library.csproj b/coffeecard/CoffeeCard.Library/CoffeeCard.Library.csproj
index 5b085de9..96b18496 100644
--- a/coffeecard/CoffeeCard.Library/CoffeeCard.Library.csproj
+++ b/coffeecard/CoffeeCard.Library/CoffeeCard.Library.csproj
@@ -5,13 +5,12 @@
-
+
+
-
-
@@ -20,7 +19,6 @@
-
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230503203850_AzureMigration.cs b/coffeecard/CoffeeCard.Library/Migrations/20230503203850_AzureMigration.cs
index e785ba9b..6d42b3af 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230503203850_AzureMigration.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230503203850_AzureMigration.cs
@@ -1,5 +1,5 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
+using System;
#nullable disable
@@ -9,10 +9,10 @@ public partial class AzureMigration : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.EnsureSchema(
+ _ = migrationBuilder.EnsureSchema(
name: "dbo");
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "Products",
schema: "dbo",
columns: table => new
@@ -28,10 +28,10 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_Products", x => x.Id);
+ _ = table.PrimaryKey("PK_Products", x => x.Id);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "Programmes",
schema: "dbo",
columns: table => new
@@ -44,10 +44,10 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_Programmes", x => x.Id);
+ _ = table.PrimaryKey("PK_Programmes", x => x.Id);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "WebhookConfigurations",
schema: "dbo",
columns: table => new
@@ -60,10 +60,10 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_WebhookConfigurations", x => x.Id);
+ _ = table.PrimaryKey("PK_WebhookConfigurations", x => x.Id);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "ProductUserGroups",
schema: "dbo",
columns: table => new
@@ -73,8 +73,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_ProductUserGroups", x => new { x.ProductId, x.UserGroup });
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_ProductUserGroups", x => new { x.ProductId, x.UserGroup });
+ _ = table.ForeignKey(
name: "FK_ProductUserGroups_Products_ProductId",
column: x => x.ProductId,
principalSchema: "dbo",
@@ -83,7 +83,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
onDelete: ReferentialAction.Cascade);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "Users",
schema: "dbo",
columns: table => new
@@ -105,8 +105,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_Users", x => x.Id);
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_Users", x => x.Id);
+ _ = table.ForeignKey(
name: "FK_Users_Programmes_Programme_Id",
column: x => x.Programme_Id,
principalSchema: "dbo",
@@ -115,7 +115,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
onDelete: ReferentialAction.Cascade);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "LoginAttempts",
schema: "dbo",
columns: table => new
@@ -127,8 +127,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_LoginAttempts", x => x.Id);
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_LoginAttempts", x => x.Id);
+ _ = table.ForeignKey(
name: "FK_LoginAttempts_Users_User_Id",
column: x => x.User_Id,
principalSchema: "dbo",
@@ -137,7 +137,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
onDelete: ReferentialAction.Cascade);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "Purchases",
schema: "dbo",
columns: table => new
@@ -157,15 +157,15 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_Purchases", x => x.Id);
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_Purchases", x => x.Id);
+ _ = table.ForeignKey(
name: "FK_Purchases_Products_ProductId",
column: x => x.ProductId,
principalSchema: "dbo",
principalTable: "Products",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
+ _ = table.ForeignKey(
name: "FK_Purchases_Users_PurchasedBy_Id",
column: x => x.PurchasedBy_Id,
principalSchema: "dbo",
@@ -174,7 +174,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
onDelete: ReferentialAction.Cascade);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "Statistics",
schema: "dbo",
columns: table => new
@@ -189,8 +189,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_Statistics", x => x.Id);
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_Statistics", x => x.Id);
+ _ = table.ForeignKey(
name: "FK_Statistics_Users_User_Id",
column: x => x.User_Id,
principalSchema: "dbo",
@@ -199,7 +199,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
onDelete: ReferentialAction.Cascade);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "Tokens",
schema: "dbo",
columns: table => new
@@ -211,8 +211,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_Tokens", x => x.Id);
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_Tokens", x => x.Id);
+ _ = table.ForeignKey(
name: "FK_Tokens_Users_User_Id",
column: x => x.User_Id,
principalSchema: "dbo",
@@ -220,7 +220,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
principalColumn: "Id");
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "Vouchers",
schema: "dbo",
columns: table => new
@@ -237,15 +237,15 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_Vouchers", x => x.Id);
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_Vouchers", x => x.Id);
+ _ = table.ForeignKey(
name: "FK_Vouchers_Products_Product_Id",
column: x => x.Product_Id,
principalSchema: "dbo",
principalTable: "Products",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
+ _ = table.ForeignKey(
name: "FK_Vouchers_Users_User_Id",
column: x => x.User_Id,
principalSchema: "dbo",
@@ -253,7 +253,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
principalColumn: "Id");
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "Tickets",
schema: "dbo",
columns: table => new
@@ -269,15 +269,15 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_Tickets", x => x.Id);
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_Tickets", x => x.Id);
+ _ = table.ForeignKey(
name: "FK_Tickets_Purchases_Purchase_Id",
column: x => x.Purchase_Id,
principalSchema: "dbo",
principalTable: "Purchases",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
+ _ = table.ForeignKey(
name: "FK_Tickets_Users_Owner_Id",
column: x => x.Owner_Id,
principalSchema: "dbo",
@@ -285,80 +285,80 @@ protected override void Up(MigrationBuilder migrationBuilder)
principalColumn: "Id");
});
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_LoginAttempts_User_Id",
schema: "dbo",
table: "LoginAttempts",
column: "User_Id");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Purchases_OrderId",
schema: "dbo",
table: "Purchases",
column: "OrderId");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Purchases_ProductId",
schema: "dbo",
table: "Purchases",
column: "ProductId");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Purchases_PurchasedBy_Id",
schema: "dbo",
table: "Purchases",
column: "PurchasedBy_Id");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Purchases_TransactionId",
schema: "dbo",
table: "Purchases",
column: "TransactionId");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Statistics_User_Id",
schema: "dbo",
table: "Statistics",
column: "User_Id");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Tickets_Owner_Id",
schema: "dbo",
table: "Tickets",
column: "Owner_Id");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Tickets_Purchase_Id",
schema: "dbo",
table: "Tickets",
column: "Purchase_Id");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Tokens_User_Id",
schema: "dbo",
table: "Tokens",
column: "User_Id");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Users_Programme_Id",
schema: "dbo",
table: "Users",
column: "Programme_Id");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Vouchers_Code",
schema: "dbo",
table: "Vouchers",
column: "Code",
unique: true);
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Vouchers_Product_Id",
schema: "dbo",
table: "Vouchers",
column: "Product_Id");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Vouchers_User_Id",
schema: "dbo",
table: "Vouchers",
@@ -367,47 +367,47 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "LoginAttempts",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "ProductUserGroups",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "Statistics",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "Tickets",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "Tokens",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "Vouchers",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "WebhookConfigurations",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "Purchases",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "Products",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "Users",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "Programmes",
schema: "dbo");
}
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230514103253_UserEmailIndexAdded.cs b/coffeecard/CoffeeCard.Library/Migrations/20230514103253_UserEmailIndexAdded.cs
index a607dd82..8f4a00f7 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230514103253_UserEmailIndexAdded.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230514103253_UserEmailIndexAdded.cs
@@ -8,7 +8,7 @@ public partial class UserEmailIndexAdded : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.AlterColumn(
+ _ = migrationBuilder.AlterColumn(
name: "Email",
schema: "dbo",
table: "Users",
@@ -17,7 +17,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
oldClrType: typeof(string),
oldType: "nvarchar(max)");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Users_Email",
schema: "dbo",
table: "Users",
@@ -26,12 +26,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropIndex(
+ _ = migrationBuilder.DropIndex(
name: "IX_Users_Email",
schema: "dbo",
table: "Users");
- migrationBuilder.AlterColumn(
+ _ = migrationBuilder.AlterColumn(
name: "Email",
schema: "dbo",
table: "Users",
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230523163048_StatisticIndex.cs b/coffeecard/CoffeeCard.Library/Migrations/20230523163048_StatisticIndex.cs
index 79e4039f..da2fa7af 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230523163048_StatisticIndex.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230523163048_StatisticIndex.cs
@@ -8,7 +8,7 @@ public partial class StatisticIndex : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Statistics_Preset_ExpiryDate",
schema: "dbo",
table: "Statistics",
@@ -17,7 +17,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropIndex(
+ _ = migrationBuilder.DropIndex(
name: "IX_Statistics_Preset_ExpiryDate",
schema: "dbo",
table: "Statistics");
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230612202437_PurchaseStatus-Migration.cs b/coffeecard/CoffeeCard.Library/Migrations/20230612202437_PurchaseStatus-Migration.cs
index bbd3aadc..619d6810 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230612202437_PurchaseStatus-Migration.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230612202437_PurchaseStatus-Migration.cs
@@ -8,8 +8,8 @@ public partial class PurchaseStatusMigration : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Status = 'Completed' WHERE Completed = 1 AND Status IS NULL");
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Status = 'Cancelled' WHERE Completed = 0 AND Status IS NULL");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Status = 'Completed' WHERE Completed = 1 AND Status IS NULL");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Status = 'Cancelled' WHERE Completed = 0 AND Status IS NULL");
}
protected override void Down(MigrationBuilder migrationBuilder)
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230612203926_Purchases-DropCompletedColumn.cs b/coffeecard/CoffeeCard.Library/Migrations/20230612203926_Purchases-DropCompletedColumn.cs
index a3eb291d..2c9ce3c1 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230612203926_Purchases-DropCompletedColumn.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230612203926_Purchases-DropCompletedColumn.cs
@@ -8,12 +8,12 @@ public partial class PurchasesDropCompletedColumn : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropColumn(
+ _ = migrationBuilder.DropColumn(
name: "Completed",
schema: "dbo",
table: "Purchases");
- migrationBuilder.AlterColumn(
+ _ = migrationBuilder.AlterColumn(
name: "Status",
schema: "dbo",
table: "Purchases",
@@ -27,7 +27,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.AlterColumn(
+ _ = migrationBuilder.AlterColumn(
name: "Status",
schema: "dbo",
table: "Purchases",
@@ -36,7 +36,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
oldClrType: typeof(string),
oldType: "nvarchar(max)");
- migrationBuilder.AddColumn(
+ _ = migrationBuilder.AddColumn(
name: "Completed",
schema: "dbo",
table: "Purchases",
@@ -44,8 +44,8 @@ protected override void Down(MigrationBuilder migrationBuilder)
nullable: false,
defaultValue: false);
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Completed = 0 WHERE Status != 'Completed'");
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Completed = 1 WHERE Status = 'Completed'");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Completed = 0 WHERE Status != 'Completed'");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Completed = 1 WHERE Status = 'Completed'");
}
}
}
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230711144034_AddPurchaseTypes.cs b/coffeecard/CoffeeCard.Library/Migrations/20230711144034_AddPurchaseTypes.cs
index 5054536d..82704425 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230711144034_AddPurchaseTypes.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230711144034_AddPurchaseTypes.cs
@@ -8,21 +8,21 @@ public partial class AddPurchaseTypes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.AddColumn(
+ _ = migrationBuilder.AddColumn(
name: "PurchaseId",
schema: "dbo",
table: "Vouchers",
type: "int",
nullable: true);
- migrationBuilder.AddColumn(
+ _ = migrationBuilder.AddColumn(
name: "Type",
schema: "dbo",
table: "Purchases",
type: "nvarchar(max)",
nullable: true);
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "PosPurchases",
schema: "dbo",
columns: table => new
@@ -32,8 +32,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_PosPurchases", x => x.PurchaseId);
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_PosPurchases", x => x.PurchaseId);
+ _ = table.ForeignKey(
name: "FK_PosPurchases_Purchases_PurchaseId",
column: x => x.PurchaseId,
principalSchema: "dbo",
@@ -45,7 +45,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "PosPurchases",
schema: "dbo");
}
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230711161456_PurchaseDataCleanup.cs b/coffeecard/CoffeeCard.Library/Migrations/20230711161456_PurchaseDataCleanup.cs
index 1095fdc8..261064dc 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230711161456_PurchaseDataCleanup.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230711161456_PurchaseDataCleanup.cs
@@ -9,20 +9,20 @@ public partial class PurchaseDataCleanup : Migration
protected override void Up(MigrationBuilder migrationBuilder)
{
// Set the Type Column on the purchases table
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'Voucher' WHERE TransactionId like 'VOUCHER%'");
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'Free' Where TransactionId = '00000000-0000-0000-0000-000000000000'");
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'MobilePayV1' Where (len(TransactionId) < 36 and TransactionId not like 'VOUCHER%' and not OrderId = 'Analog')");
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'MobilePayV1' Where TransactionId is null");
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'MobilePayV2' Where (len(TransactionId) = 36 and not TransactionId = '00000000-0000-0000-0000-000000000000') ");
- migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'PointOfSale' Where OrderId like 'Analog'");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'Voucher' WHERE TransactionId like 'VOUCHER%'");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'Free' Where TransactionId = '00000000-0000-0000-0000-000000000000'");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'MobilePayV1' Where (len(TransactionId) < 36 and TransactionId not like 'VOUCHER%' and not OrderId = 'Analog')");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'MobilePayV1' Where TransactionId is null");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'MobilePayV2' Where (len(TransactionId) = 36 and not TransactionId = '00000000-0000-0000-0000-000000000000') ");
+ _ = migrationBuilder.Sql("UPDATE dbo.Purchases SET Type = 'PointOfSale' Where OrderId like 'Analog'");
// Update vouchers with references to the purchase issued by its redemption
- migrationBuilder.Sql("update Vouchers set PurchaseId = Purchases.Id from Purchases where Purchases.OrderId = Vouchers.Code");
+ _ = migrationBuilder.Sql("update Vouchers set PurchaseId = Purchases.Id from Purchases where Purchases.OrderId = Vouchers.Code");
// Create new vouchers for purchases where the same voucher have been used to issue multiple purchase
- migrationBuilder.Sql("insert into Vouchers (Code, DateCreated, DateUsed, Description, Requester, Product_Id, User_Id, PurchaseId) select Purchases.OrderId + '-' + cast(Purchases.Id as varchar), Purchases.DateCreated, Purchases.DateCreated, 'Creation of extra vouchers for purchases without references', 'AnalogIO', Purchases.ProductId, Purchases.PurchasedBy_Id, Id from Purchases where Type = 'Voucher' and Id not in (select PurchaseId from Vouchers where PurchaseId is not null)");
+ _ = migrationBuilder.Sql("insert into Vouchers (Code, DateCreated, DateUsed, Description, Requester, Product_Id, User_Id, PurchaseId) select Purchases.OrderId + '-' + cast(Purchases.Id as varchar), Purchases.DateCreated, Purchases.DateCreated, 'Creation of extra vouchers for purchases without references', 'AnalogIO', Purchases.ProductId, Purchases.PurchasedBy_Id, Id from Purchases where Type = 'Voucher' and Id not in (select PurchaseId from Vouchers where PurchaseId is not null)");
// Insert data to the new Pos table
- migrationBuilder.Sql("insert into PosPurchases (PurchaseId, BaristaInitials) select Id, TransactionId from Purchases where OrderId like 'Analog'");
+ _ = migrationBuilder.Sql("insert into PosPurchases (PurchaseId, BaristaInitials) select Id, TransactionId from Purchases where OrderId like 'Analog'");
}
protected override void Down(MigrationBuilder migrationBuilder)
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230714211716_PurchaseOrderIdUniqueAndExternalTransactionId.cs b/coffeecard/CoffeeCard.Library/Migrations/20230714211716_PurchaseOrderIdUniqueAndExternalTransactionId.cs
index 1ffd6457..1209e14c 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230714211716_PurchaseOrderIdUniqueAndExternalTransactionId.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230714211716_PurchaseOrderIdUniqueAndExternalTransactionId.cs
@@ -9,26 +9,26 @@ public partial class PurchaseOrderIdUniqueAndExternalTransactionId : Migration
protected override void Up(MigrationBuilder migrationBuilder)
{
// Make transactionId null, where not MobilePayV1, or MobilepayV2, and generate unique Guid orderIds
- migrationBuilder.Sql("update Purchases set OrderId = NEWID(), TransactionId=null where Type != 'MobilePayV1' and Type != 'MobilePayV2' or OrderId = 'OLD PURCHASES'");
+ _ = migrationBuilder.Sql("update Purchases set OrderId = NEWID(), TransactionId=null where Type != 'MobilePayV1' and Type != 'MobilePayV2' or OrderId = 'OLD PURCHASES'");
- migrationBuilder.DropIndex(
+ _ = migrationBuilder.DropIndex(
name: "IX_Purchases_OrderId",
schema: "dbo",
table: "Purchases");
- migrationBuilder.RenameColumn(
+ _ = migrationBuilder.RenameColumn(
name: "TransactionId",
schema: "dbo",
table: "Purchases",
newName: "ExternalTransactionId");
- migrationBuilder.RenameIndex(
+ _ = migrationBuilder.RenameIndex(
name: "IX_Purchases_TransactionId",
schema: "dbo",
table: "Purchases",
newName: "IX_Purchases_ExternalTransactionId");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Purchases_OrderId",
schema: "dbo",
table: "Purchases",
@@ -38,24 +38,24 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropIndex(
+ _ = migrationBuilder.DropIndex(
name: "IX_Purchases_OrderId",
schema: "dbo",
table: "Purchases");
- migrationBuilder.RenameColumn(
+ _ = migrationBuilder.RenameColumn(
name: "ExternalTransactionId",
schema: "dbo",
table: "Purchases",
newName: "TransactionId");
- migrationBuilder.RenameIndex(
+ _ = migrationBuilder.RenameIndex(
name: "IX_Purchases_ExternalTransactionId",
schema: "dbo",
table: "Purchases",
newName: "IX_Purchases_TransactionId");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Purchases_OrderId",
schema: "dbo",
table: "Purchases",
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20230818201050_PurchaseTypeNonNullable.cs b/coffeecard/CoffeeCard.Library/Migrations/20230818201050_PurchaseTypeNonNullable.cs
index 47e60fdb..3d14f67f 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20230818201050_PurchaseTypeNonNullable.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20230818201050_PurchaseTypeNonNullable.cs
@@ -8,7 +8,7 @@ public partial class PurchaseTypeNonNullable : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.AlterColumn(
+ _ = migrationBuilder.AlterColumn(
name: "Type",
schema: "dbo",
table: "Purchases",
@@ -21,7 +21,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.AlterColumn(
+ _ = migrationBuilder.AlterColumn(
name: "Type",
schema: "dbo",
table: "Purchases",
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20240111163619_NewIndexName.cs b/coffeecard/CoffeeCard.Library/Migrations/20240111163619_NewIndexName.cs
index 46fbab57..ddffcb82 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20240111163619_NewIndexName.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20240111163619_NewIndexName.cs
@@ -8,7 +8,7 @@ public partial class NewIndexName : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.AlterColumn(
+ _ = migrationBuilder.AlterColumn(
name: "Name",
schema: "dbo",
table: "Users",
@@ -17,7 +17,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
oldClrType: typeof(string),
oldType: "nvarchar(max)");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Users_Name",
schema: "dbo",
table: "Users",
@@ -26,12 +26,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropIndex(
+ _ = migrationBuilder.DropIndex(
name: "IX_Users_Name",
schema: "dbo",
table: "Users");
- migrationBuilder.AlterColumn(
+ _ = migrationBuilder.AlterColumn(
name: "Name",
schema: "dbo",
table: "Users",
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20240120143222_MenuItemProducts.cs b/coffeecard/CoffeeCard.Library/Migrations/20240120143222_MenuItemProducts.cs
index c2fbb5c1..627303af 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20240120143222_MenuItemProducts.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20240120143222_MenuItemProducts.cs
@@ -8,14 +8,14 @@ public partial class MenuItemProducts : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.AddColumn(
+ _ = migrationBuilder.AddColumn(
name: "UsedOnMenuItemId",
schema: "dbo",
table: "Tickets",
type: "int",
nullable: true);
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "MenuItems",
schema: "dbo",
columns: table => new
@@ -26,10 +26,10 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_MenuItems", x => x.Id);
+ _ = table.PrimaryKey("PK_MenuItems", x => x.Id);
});
- migrationBuilder.CreateTable(
+ _ = migrationBuilder.CreateTable(
name: "MenuItemProducts",
schema: "dbo",
columns: table => new
@@ -39,15 +39,15 @@ protected override void Up(MigrationBuilder migrationBuilder)
},
constraints: table =>
{
- table.PrimaryKey("PK_MenuItemProducts", x => new { x.MenuItemId, x.ProductId });
- table.ForeignKey(
+ _ = table.PrimaryKey("PK_MenuItemProducts", x => new { x.MenuItemId, x.ProductId });
+ _ = table.ForeignKey(
name: "FK_MenuItemProducts_MenuItems_MenuItemId",
column: x => x.MenuItemId,
principalSchema: "dbo",
principalTable: "MenuItems",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
+ _ = table.ForeignKey(
name: "FK_MenuItemProducts_Products_ProductId",
column: x => x.ProductId,
principalSchema: "dbo",
@@ -56,26 +56,26 @@ protected override void Up(MigrationBuilder migrationBuilder)
onDelete: ReferentialAction.Cascade);
});
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Tickets_UsedOnMenuItemId",
schema: "dbo",
table: "Tickets",
column: "UsedOnMenuItemId");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_MenuItemProducts_ProductId",
schema: "dbo",
table: "MenuItemProducts",
column: "ProductId");
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_MenuItems_Name",
schema: "dbo",
table: "MenuItems",
column: "Name",
unique: true);
- migrationBuilder.AddForeignKey(
+ _ = migrationBuilder.AddForeignKey(
name: "FK_Tickets_MenuItems_UsedOnMenuItemId",
schema: "dbo",
table: "Tickets",
@@ -87,25 +87,25 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropForeignKey(
+ _ = migrationBuilder.DropForeignKey(
name: "FK_Tickets_MenuItems_UsedOnMenuItemId",
schema: "dbo",
table: "Tickets");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "MenuItemProducts",
schema: "dbo");
- migrationBuilder.DropTable(
+ _ = migrationBuilder.DropTable(
name: "MenuItems",
schema: "dbo");
- migrationBuilder.DropIndex(
+ _ = migrationBuilder.DropIndex(
name: "IX_Tickets_UsedOnMenuItemId",
schema: "dbo",
table: "Tickets");
- migrationBuilder.DropColumn(
+ _ = migrationBuilder.DropColumn(
name: "UsedOnMenuItemId",
schema: "dbo",
table: "Tickets");
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20240213174936_addActiveToMenuItem.cs b/coffeecard/CoffeeCard.Library/Migrations/20240213174936_addActiveToMenuItem.cs
index 4cde052c..ea5ee29d 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20240213174936_addActiveToMenuItem.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20240213174936_addActiveToMenuItem.cs
@@ -8,7 +8,7 @@ public partial class addActiveToMenuItem : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.AddColumn(
+ _ = migrationBuilder.AddColumn(
name: "Active",
schema: "dbo",
table: "MenuItems",
@@ -19,7 +19,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropColumn(
+ _ = migrationBuilder.DropColumn(
name: "Active",
schema: "dbo",
table: "MenuItems");
diff --git a/coffeecard/CoffeeCard.Library/Migrations/20240227174524_AddUserGroupIndexToUsers.cs b/coffeecard/CoffeeCard.Library/Migrations/20240227174524_AddUserGroupIndexToUsers.cs
index 3b18115e..2dec24a4 100644
--- a/coffeecard/CoffeeCard.Library/Migrations/20240227174524_AddUserGroupIndexToUsers.cs
+++ b/coffeecard/CoffeeCard.Library/Migrations/20240227174524_AddUserGroupIndexToUsers.cs
@@ -10,7 +10,7 @@ public partial class AddUserGroupIndexToUsers : Migration
///
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.CreateIndex(
+ _ = migrationBuilder.CreateIndex(
name: "IX_Users_UserGroup",
schema: "dbo",
table: "Users",
@@ -20,7 +20,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
///
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropIndex(
+ _ = migrationBuilder.DropIndex(
name: "IX_Users_UserGroup",
schema: "dbo",
table: "Users");
diff --git a/coffeecard/CoffeeCard.Library/Persistence/CoffeecardContext.cs b/coffeecard/CoffeeCard.Library/Persistence/CoffeecardContext.cs
index 1ee05f1e..c471d654 100644
--- a/coffeecard/CoffeeCard.Library/Persistence/CoffeecardContext.cs
+++ b/coffeecard/CoffeeCard.Library/Persistence/CoffeecardContext.cs
@@ -36,20 +36,20 @@ public CoffeeCardContext(DbContextOptions options, DatabaseSe
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
- modelBuilder.HasDefaultSchema(_databaseSettings.SchemaName);
+ _ = modelBuilder.HasDefaultSchema(_databaseSettings.SchemaName);
// Setup PUG compound primary key
- modelBuilder.Entity()
+ _ = modelBuilder.Entity()
.HasKey(pug => new
{
pug.ProductId,
pug.UserGroup
});
- modelBuilder.Entity()
+ _ = modelBuilder.Entity()
.HasKey(mip => new { mip.MenuItemId, mip.ProductId });
- modelBuilder.Entity