diff --git a/VichVich.BuildingBlocks.Infrastructure/EntityTypeConfigurationBase.cs b/VichVich.BuildingBlocks.Infrastructure/EntityTypeConfigurationBase.cs index 17d08c5..2ff151e 100644 --- a/VichVich.BuildingBlocks.Infrastructure/EntityTypeConfigurationBase.cs +++ b/VichVich.BuildingBlocks.Infrastructure/EntityTypeConfigurationBase.cs @@ -31,8 +31,7 @@ public class BaseEntityConfiguration : IEntityTypeConfiguration builder.Property(x => x.Id) .HasConversion( id => id.Value, - value => (TId)Activator.CreateInstance(typeof(TId), value)!) - .ValueGeneratedOnAdd(); + value => (TId)Activator.CreateInstance(typeof(TId), value)!); // ❌ UseHiLo را اینجا نزنید، چون هنوز نام جدول مشخص نیست } diff --git a/VichVich.BuildingBlocks.Infrastructure/ModelBuilderExtensions.cs b/VichVich.BuildingBlocks.Infrastructure/ModelBuilderExtensions.cs index 500faf0..72b1fa0 100644 --- a/VichVich.BuildingBlocks.Infrastructure/ModelBuilderExtensions.cs +++ b/VichVich.BuildingBlocks.Infrastructure/ModelBuilderExtensions.cs @@ -1,11 +1,12 @@ using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata; using Vizhvizh.BuildingBlocks.Domain; public static class ModelBuilderExtensions { public static void AddHiLoSequences(this ModelBuilder modelBuilder) { - var entityTypes = modelBuilder.Model.GetEntityTypes(); + var entityTypes = modelBuilder.Model.GetEntityTypes().Where(x => !x.IsOwned()); foreach (var entityType in entityTypes) { @@ -15,23 +16,21 @@ public static class ModelBuilderExtensions var keyProperty = primaryKey.Properties.FirstOrDefault(); if (keyProperty == null) continue; - // ✅ استخراج نوع واقعی از TypedIdValueBase var actualKeyType = GetUnderlyingKeyType(keyProperty.ClrType); - - // فقط برای int و long if (actualKeyType == typeof(int) || actualKeyType == typeof(long)) { var tableName = entityType.GetTableName(); var sequenceName = GetSequenceName(tableName ?? entityType.Name); var schema = entityType.GetSchema(); + // ایجاد Sequence if (actualKeyType == typeof(int)) { modelBuilder.HasSequence(sequenceName, schema) .StartsAt(1) .IncrementsBy(1); } - else if (actualKeyType == typeof(long)) + else { modelBuilder.HasSequence(sequenceName, schema) .StartsAt(1) @@ -39,38 +38,14 @@ public static class ModelBuilderExtensions } keyProperty.SetHiLoSequenceName(sequenceName); + keyProperty.SetHiLoSequenceSchema(schema); + + keyProperty.SetValueGenerationStrategy( + SqlServerValueGenerationStrategy.SequenceHiLo); } - - } } - //public static void UseHiLoForEntities(this ModelBuilder modelBuilder) - //{ - // var entityTypes = modelBuilder.Model.GetEntityTypes(); - - // foreach (var entityType in entityTypes) - // { - // var primaryKey = entityType.FindPrimaryKey(); - // if (primaryKey == null) continue; - - // var keyProperty = primaryKey.Properties.FirstOrDefault(); - // if (keyProperty == null) continue; - - // // ✅ از همان متد استفاده کنید - // var actualKeyType = GetUnderlyingKeyType(keyProperty.ClrType); - - // if (actualKeyType == typeof(int) || actualKeyType == typeof(long)) - // { - // var tableName = entityType.GetTableName(); - // var sequenceName = GetSequenceName(tableName ?? entityType.Name); - - // // تنظیم Hi-Lo روی Property - // keyProperty.SetHiLoSequenceName(sequenceName); - // } - // } - //} - /// /// استخراج نوع اصلی از TypedIdValueBase /// پشتیبانی از: diff --git a/Vizhvizh.GoldGallery.Api/Controllers/CategoryController.cs b/Vizhvizh.GoldGallery.Api/Controllers/CategoryController.cs new file mode 100644 index 0000000..40b018e --- /dev/null +++ b/Vizhvizh.GoldGallery.Api/Controllers/CategoryController.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNetCore.Mvc; +using Vizhvizh.BuildingBlocks.Infrastructure; +using Vizhvizh.GoldGallery.ApplicationContract.Commands; + +namespace Vizhvizh.GoldGallery.Api.Controllers; + +[ApiController] +[Route("api/[controller]/[action]")] +public class CategoryController(IExecutor executor) : ControllerBase +{ + [HttpPost] + public async Task Create([FromBody] CreateCategoryCommand request, CancellationToken cancellationToken) + { + await executor.Execute(request, cancellationToken); + return Ok(); + } +} diff --git a/Vizhvizh.GoldGallery.Application/CommandHandlers/Categories/CreateCategoryCommandHandler.cs b/Vizhvizh.GoldGallery.Application/CommandHandlers/Categories/CreateCategoryCommandHandler.cs index 0400dd9..d6b50f7 100644 --- a/Vizhvizh.GoldGallery.Application/CommandHandlers/Categories/CreateCategoryCommandHandler.cs +++ b/Vizhvizh.GoldGallery.Application/CommandHandlers/Categories/CreateCategoryCommandHandler.cs @@ -2,17 +2,18 @@ using Vizhvizh.GoldGallery.ApplicationContract.Commands; using Vizhvizh.GoldGallery.Domain.Products.Entities; using Vizhvizh.GoldGallery.Domain.Products.Repositories; +using Vizhvizh.GoldGallery.Domain.Products.ValuesObjects; namespace Vizhvizh.GoldGallery.Application.CommandHandlers.Categories; public class CreateCategoryCommandHandler(ICategoryRepository categoryRepository) : ICommandHandler { - public Task Handle(CreateCategoryCommand request, CancellationToken cancellationToken) + public async Task Handle(CreateCategoryCommand request, CancellationToken cancellationToken) { - //var category = Category.CreateNew(request.Title, - // request.Description, - // request.Image) + var category = Category.CreateNew(request.Title, + request.Description, + request.Image, CategoryPath.CreateNew("/1/")); - throw new Exception(); + await categoryRepository.AddAsync(category, cancellationToken); } } diff --git a/Vizhvizh.GoldGallery.Domain/Products/Entities/Category.cs b/Vizhvizh.GoldGallery.Domain/Products/Entities/Category.cs index 2538edf..bea94b4 100644 --- a/Vizhvizh.GoldGallery.Domain/Products/Entities/Category.cs +++ b/Vizhvizh.GoldGallery.Domain/Products/Entities/Category.cs @@ -29,14 +29,13 @@ public class Category : Entity DescriptionVO description, CategoryImage image, CategoryPath path, - CategoryId? parentId = null, - CategoryPath? parentPath = null) + CategoryId? parentId = null) { _title = title; _description = description; _image = image; _parentId = parentId; - //_path = CategoryPath.CreatePath(parentPath, ; + _path = path; } @@ -44,10 +43,9 @@ public class Category : Entity DescriptionVO description, CategoryImage image, CategoryPath path, - CategoryId? parentId = null, - CategoryPath? parentPath = null) + CategoryId? parentId = null) { - return new Category(title, description, image, path, parentId, parentPath); + return new Category(title, description, image, path, parentId); } public TitleVO Title => _title; diff --git a/Vizhvizh.GoldGallery.Domain/Products/ValuesObjects/CategoryImage.cs b/Vizhvizh.GoldGallery.Domain/Products/ValuesObjects/CategoryImage.cs index fccb9bb..52c325f 100644 --- a/Vizhvizh.GoldGallery.Domain/Products/ValuesObjects/CategoryImage.cs +++ b/Vizhvizh.GoldGallery.Domain/Products/ValuesObjects/CategoryImage.cs @@ -17,4 +17,10 @@ public class CategoryImage : ValueObject => new CategoryImage(value); public string Value { get; init; } + + public static implicit operator CategoryImage?(string? value) + => string.IsNullOrWhiteSpace(value) ? null : new(value); + + public static implicit operator string(CategoryImage value) + => value.Value; } diff --git a/Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422161848_initial.Designer.cs b/Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422164946_initial.Designer.cs similarity index 86% rename from Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422161848_initial.Designer.cs rename to Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422164946_initial.Designer.cs index d4e1723..8a5f958 100644 --- a/Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422161848_initial.Designer.cs +++ b/Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422164946_initial.Designer.cs @@ -12,7 +12,7 @@ using Vizhvizh.GoldGallery.Infrastructure.EF; namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { [DbContext(typeof(GoldGalleryDbContext))] - [Migration("20260422161848_initial")] + [Migration("20260422164946_initial")] partial class initial { /// @@ -55,10 +55,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Members"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Members", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -90,10 +89,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Categories"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Categories", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -139,10 +137,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Products", "GoldGallery"); b.Property("CategoryId") .HasColumnType("bigint"); @@ -184,10 +181,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_ProductVariants", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -214,10 +210,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductSpecifications"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_ProductSpecifications", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -253,9 +248,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None) - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Managements"); + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Managements", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -277,10 +272,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ShippingMethods"); + .HasColumnType("int"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_ShippingMethods", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -317,10 +311,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Shops"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Shops", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -363,10 +356,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Sliders"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Sliders", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -393,10 +385,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Resources"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Resources", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -435,10 +426,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Roles"); + .HasColumnType("int"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Roles", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -475,10 +465,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_RoleResources"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_RoleResources", "GoldGallery"); b.Property("AccessLevel") .HasColumnType("int"); @@ -508,10 +497,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Users"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Users", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -541,8 +529,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Members.ValuesObjects.MemberAvatar", "Avatar", b1 => { b1.Property("MemberId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Members"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() @@ -561,8 +548,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Members.ValuesObjects.MemberFullName", "FullName", b1 => { b1.Property("MemberId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Members"); + .HasColumnType("bigint"); b1.Property("FirstName") .IsRequired() @@ -587,8 +573,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Members.ValuesObjects.MemberNationalCode", "NationalCode", b1 => { b1.Property("MemberId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Members"); + .HasColumnType("bigint"); b1.Property("Value") .HasMaxLength(10) @@ -621,8 +606,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.CategoryImage", "Image", b1 => { b1.Property("CategoryId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Categories"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() @@ -655,8 +639,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductScore", "Score", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Score") .ValueGeneratedOnAdd() @@ -680,8 +663,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.CraftsmanshipFee", "CraftsmanshipFee", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Value") .HasColumnType("decimal(4,2)") @@ -698,8 +680,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductCondition", "ProductCondition", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Value") .HasColumnType("int") @@ -716,8 +697,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductFile3D", "File3D", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Value") .HasMaxLength(150) @@ -735,8 +715,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductImage", "Image", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() @@ -776,8 +755,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductScore", "Score", b1 => { b1.Property("ProductVariantId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); b1.Property("Score") .ValueGeneratedOnAdd() @@ -802,8 +780,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.GoldWeight", "Weight", b1 => { b1.Property("ProductVariantId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); b1.Property("Value") .HasColumnType("decimal(7,3)") @@ -820,8 +797,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductQuantity", "Quantity", b1 => { b1.Property("ProductVariantId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); b1.Property("Value") .HasColumnType("float") @@ -838,8 +814,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductVariantGallery", "Gallery", b1 => { b1.Property("ProductVariantId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); b1.Property("Values") .IsRequired() @@ -896,8 +871,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects.ShippingMethodImage", "Image", b1 => { b1.Property("ShippingMethodId") - .HasColumnType("int") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ShippingMethods"); + .HasColumnType("int"); b1.Property("Value") .IsRequired() @@ -922,8 +896,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects.ShopBusinessLicense", "BusinessLicense", b1 => { b1.Property("ShopId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Shops"); + .HasColumnType("bigint"); b1.Property("Code") .IsRequired() @@ -948,8 +921,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects.ShopLocation", "Location", b1 => { b1.Property("ShopId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Shops"); + .HasColumnType("bigint"); b1.Property("Address") .IsRequired() @@ -990,8 +962,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects.ShopLogo", "Logo", b1 => { b1.Property("ShopId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Shops"); + .HasColumnType("bigint"); b1.Property("Value") .HasMaxLength(150) @@ -1021,8 +992,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Sliders.ValuesObjects.SliderImage", "Image", b1 => { b1.Property("SliderId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Sliders"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() @@ -1041,8 +1011,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Sliders.ValuesObjects.SliderKey", "Key", b1 => { b1.Property("SliderId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Sliders"); + .HasColumnType("bigint"); b1.Property("Type") .HasColumnType("INT") @@ -1065,8 +1034,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Sliders.ValuesObjects.SliderUrl", "Url", b1 => { b1.Property("SliderId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Sliders"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() diff --git a/Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422161848_initial.cs b/Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422164946_initial.cs similarity index 96% rename from Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422161848_initial.cs rename to Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422164946_initial.cs index fe49d99..adebc70 100644 --- a/Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422161848_initial.cs +++ b/Vizhvizh.GoldGallery.Infrastructure/Migrations/20260422164946_initial.cs @@ -71,8 +71,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), Image = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), @@ -98,8 +97,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), ModuleName = table.Column(type: "int", nullable: false), @@ -117,8 +115,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), OwnerId = table.Column(type: "bigint", nullable: false), Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -141,8 +138,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), Image = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), Url = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), @@ -161,8 +157,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), MemberId = table.Column(type: "bigint", nullable: false), RowVersion = table.Column(type: "rowversion", rowVersion: true, nullable: false), CreateOn = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()") @@ -198,8 +193,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), FirstName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), LastName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), PhoneNumber = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: false), @@ -225,8 +219,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), ProductCondition = table.Column(type: "int", nullable: false), Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), @@ -262,8 +255,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "int", nullable: false), Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), Image = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), @@ -287,8 +279,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "int", nullable: false), Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), ResourceId = table.Column(type: "bigint", nullable: true), UserId = table.Column(type: "bigint", nullable: true), @@ -317,8 +308,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), ItemValues = table.Column(type: "nvarchar(max)", nullable: false), ProductId = table.Column(type: "bigint", nullable: true), @@ -341,8 +331,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), Score = table.Column(type: "TINYINT", nullable: false, defaultValue: (byte)0), TotalVoters = table.Column(type: "INT", nullable: false, defaultValue: 0), Quantity = table.Column(type: "float", nullable: false), @@ -368,8 +357,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations schema: "GoldGallery", columns: table => new { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), + Id = table.Column(type: "bigint", nullable: false), AccessLevel = table.Column(type: "int", nullable: false), RoleId = table.Column(type: "int", nullable: true), RowVersion = table.Column(type: "rowversion", rowVersion: true, nullable: false), diff --git a/Vizhvizh.GoldGallery.Infrastructure/Migrations/GoldGalleryDbContextModelSnapshot.cs b/Vizhvizh.GoldGallery.Infrastructure/Migrations/GoldGalleryDbContextModelSnapshot.cs index f22e662..d1c2de9 100644 --- a/Vizhvizh.GoldGallery.Infrastructure/Migrations/GoldGalleryDbContextModelSnapshot.cs +++ b/Vizhvizh.GoldGallery.Infrastructure/Migrations/GoldGalleryDbContextModelSnapshot.cs @@ -52,10 +52,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Members"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Members", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -87,10 +86,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Categories"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Categories", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -136,10 +134,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Products", "GoldGallery"); b.Property("CategoryId") .HasColumnType("bigint"); @@ -181,10 +178,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_ProductVariants", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -211,10 +207,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductSpecifications"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_ProductSpecifications", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -250,9 +245,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None) - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Managements"); + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Managements", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -274,10 +269,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ShippingMethods"); + .HasColumnType("int"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_ShippingMethods", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -314,10 +308,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Shops"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Shops", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -360,10 +353,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Sliders"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Sliders", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -390,10 +382,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Resources"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Resources", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -432,10 +423,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Roles"); + .HasColumnType("int"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Roles", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -472,10 +462,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_RoleResources"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_RoleResources", "GoldGallery"); b.Property("AccessLevel") .HasColumnType("int"); @@ -505,10 +494,9 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Users"); + .HasColumnType("bigint"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + SqlServerPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "Sequence_Users", "GoldGallery"); b.Property("CreateOn") .ValueGeneratedOnAdd() @@ -538,8 +526,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Members.ValuesObjects.MemberAvatar", "Avatar", b1 => { b1.Property("MemberId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Members"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() @@ -558,8 +545,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Members.ValuesObjects.MemberFullName", "FullName", b1 => { b1.Property("MemberId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Members"); + .HasColumnType("bigint"); b1.Property("FirstName") .IsRequired() @@ -584,8 +570,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Members.ValuesObjects.MemberNationalCode", "NationalCode", b1 => { b1.Property("MemberId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Members"); + .HasColumnType("bigint"); b1.Property("Value") .HasMaxLength(10) @@ -618,8 +603,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.CategoryImage", "Image", b1 => { b1.Property("CategoryId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Categories"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() @@ -652,8 +636,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductScore", "Score", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Score") .ValueGeneratedOnAdd() @@ -677,8 +660,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.CraftsmanshipFee", "CraftsmanshipFee", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Value") .HasColumnType("decimal(4,2)") @@ -695,8 +677,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductCondition", "ProductCondition", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Value") .HasColumnType("int") @@ -713,8 +694,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductFile3D", "File3D", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Value") .HasMaxLength(150) @@ -732,8 +712,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductImage", "Image", b1 => { b1.Property("ProductId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Products"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() @@ -773,8 +752,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductScore", "Score", b1 => { b1.Property("ProductVariantId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); b1.Property("Score") .ValueGeneratedOnAdd() @@ -799,8 +777,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.GoldWeight", "Weight", b1 => { b1.Property("ProductVariantId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); b1.Property("Value") .HasColumnType("decimal(7,3)") @@ -817,8 +794,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductQuantity", "Quantity", b1 => { b1.Property("ProductVariantId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); b1.Property("Value") .HasColumnType("float") @@ -835,8 +811,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Products.ValuesObjects.ProductVariantGallery", "Gallery", b1 => { b1.Property("ProductVariantId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ProductVariants"); + .HasColumnType("bigint"); b1.Property("Values") .IsRequired() @@ -893,8 +868,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects.ShippingMethodImage", "Image", b1 => { b1.Property("ShippingMethodId") - .HasColumnType("int") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_ShippingMethods"); + .HasColumnType("int"); b1.Property("Value") .IsRequired() @@ -919,8 +893,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects.ShopBusinessLicense", "BusinessLicense", b1 => { b1.Property("ShopId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Shops"); + .HasColumnType("bigint"); b1.Property("Code") .IsRequired() @@ -945,8 +918,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects.ShopLocation", "Location", b1 => { b1.Property("ShopId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Shops"); + .HasColumnType("bigint"); b1.Property("Address") .IsRequired() @@ -987,8 +959,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects.ShopLogo", "Logo", b1 => { b1.Property("ShopId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Shops"); + .HasColumnType("bigint"); b1.Property("Value") .HasMaxLength(150) @@ -1018,8 +989,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Sliders.ValuesObjects.SliderImage", "Image", b1 => { b1.Property("SliderId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Sliders"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired() @@ -1038,8 +1008,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Sliders.ValuesObjects.SliderKey", "Key", b1 => { b1.Property("SliderId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Sliders"); + .HasColumnType("bigint"); b1.Property("Type") .HasColumnType("INT") @@ -1062,8 +1031,7 @@ namespace Vizhvizh.GoldGallery.Infrastructure.Migrations b.OwnsOne("Vizhvizh.GoldGallery.Domain.Sliders.ValuesObjects.SliderUrl", "Url", b1 => { b1.Property("SliderId") - .HasColumnType("bigint") - .HasAnnotation("SqlServer:HiLoSequenceName", "Sequence_Sliders"); + .HasColumnType("bigint"); b1.Property("Value") .IsRequired()