test
All checks were successful
Branch - test - Build and Push Backend API Docker Image / build-and-push (push) Successful in 27s

This commit is contained in:
Tizian.Breuch
2025-11-07 15:24:06 +01:00
parent 627c553e59
commit 6bef982fcc
4 changed files with 6 additions and 0 deletions

View File

@@ -27,5 +27,6 @@ namespace Webshop.Application.DTOs.Products
// << NEU >>
public bool IsFeatured { get; set; }
public int FeaturedDisplayOrder { get; set; }
public byte[] RowVersion { get; set; }
}
}

View File

@@ -35,5 +35,7 @@ namespace Webshop.Application.DTOs.Products
public decimal? PurchasePrice { get; set; }
public bool IsFeatured { get; set; }
public int FeaturedDisplayOrder { get; set; }
[Required]
public byte[] RowVersion { get; set; }
}
}

View File

@@ -151,6 +151,7 @@ namespace Webshop.Application.Services.Admin
existingProduct.Images.Add(new ProductImage { Url = url, IsMainImage = false, DisplayOrder = displayOrder++ });
}
}
_context.Entry(existingProduct).Property(p => p.RowVersion).OriginalValue = productDto.RowVersion;
// --- EIGENSCHAFTEN-UPDATE ---
Console.WriteLine("---- AKTUALISIERE PRODUKT-EIGENSCHAFTEN ----");

View File

@@ -53,5 +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!
public byte[] RowVersion { get; set; }
}
}