rowversion3
All checks were successful
Branch - test - Build and Push Backend API Docker Image / build-and-push (push) Successful in 26s
All checks were successful
Branch - test - Build and Push Backend API Docker Image / build-and-push (push) Successful in 26s
This commit is contained in:
@@ -100,7 +100,8 @@ namespace Webshop.Application.Services.Admin
|
||||
IsFeatured = productDto.IsFeatured,
|
||||
FeaturedDisplayOrder = productDto.FeaturedDisplayOrder,
|
||||
Images = images,
|
||||
Productcategories = productDto.CategorieIds.Select(cId => new Productcategorie { categorieId = cId }).ToList()
|
||||
Productcategories = productDto.CategorieIds.Select(cId => new Productcategorie { categorieId = cId }).ToList(),
|
||||
RowVersion = Guid.NewGuid().ToByteArray()
|
||||
};
|
||||
|
||||
await _productRepository.AddProductAsync(newProduct);
|
||||
@@ -183,6 +184,7 @@ namespace Webshop.Application.Services.Admin
|
||||
existingProduct.LastModifiedDate = DateTimeOffset.UtcNow;
|
||||
existingProduct.IsFeatured = productDto.IsFeatured;
|
||||
existingProduct.FeaturedDisplayOrder = productDto.FeaturedDisplayOrder;
|
||||
existingProduct.RowVersion = Guid.NewGuid().ToByteArray();
|
||||
|
||||
// --- KATEGORIEN-UPDATE ---
|
||||
Console.WriteLine("---- AKTUALISIERE KATEGORIEN ----");
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Webshop.Domain.Entities
|
||||
public virtual ICollection<ProductDiscount> ProductDiscounts { get; set; } = new List<ProductDiscount>();
|
||||
public virtual ICollection<Productcategorie> Productcategories { get; set; } = new List<Productcategorie>();
|
||||
public virtual ICollection<ProductImage> Images { get; set; } = new List<ProductImage>();
|
||||
[Timestamp] // Diese Annotation ist entscheidend!
|
||||
[ConcurrencyCheck]
|
||||
public byte[] RowVersion { get; set; }
|
||||
}
|
||||
}
|
||||
1366
Webshop.Infrastructure/Migrations/20251120141425_rowversion2.Designer.cs
generated
Normal file
1366
Webshop.Infrastructure/Migrations/20251120141425_rowversion2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Webshop.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class rowversion2 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
1366
Webshop.Infrastructure/Migrations/20251120141924_rowversion3.Designer.cs
generated
Normal file
1366
Webshop.Infrastructure/Migrations/20251120141924_rowversion3.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Webshop.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class rowversion3 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -616,7 +616,6 @@ namespace Webshop.Infrastructure.Migrations
|
||||
b.Property<byte[]>("RowVersion")
|
||||
.IsConcurrencyToken()
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.HasColumnType("bytea");
|
||||
|
||||
b.Property<string>("SKU")
|
||||
|
||||
Reference in New Issue
Block a user