Hi, I'm using Postgres and I'd to prevent user delete Customer record if that record alread used in SalesOrder Table. I already defined the foreignkey in SalesOrder as the below code, but there is no happen when I deleted customer. I expected an exception message will be thrown when I delete a customer already used in dependent tables.
b.ToTable(OrderManagmentDbProperties.DbTablePrefix + "SalesOrders", OrderManagmentDbProperties.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.OrderNumber).HasColumnName(nameof(SalesOrder.OrderNumber)).IsRequired().HasMaxLength(SalesOrderConsts.OrderNumberMaxLength);
b.Property(x => x.OrderDate).HasColumnName(nameof(SalesOrder.OrderDate));
b.Property(x => x.Status).HasColumnName(nameof(SalesOrder.Status));
b.Property(x => x.SalesPerson).HasColumnName(nameof(SalesOrder.SalesPerson)).HasMaxLength(SalesOrderConsts.SalesPersonMaxLength);
b.Property(x => x.TotalAmount).HasColumnName(nameof(SalesOrder.TotalAmount));
b.HasOne<Customer>().WithMany().IsRequired().HasForeignKey(x => x.CustomerId).OnDelete(DeleteBehavior.SetNull);
});
Please help me for this issue. Thanks, Dharmar (Han Nguyen)
Hi, I'm using ABP Suite to create an application solution with following options:
Thanks, Dharma (Han Nguyen)
Thanks Dharma (Han Nguyen)
Dear ABP Team, May I ask for a template to dev Flutter mobile app using ABP Framework as the backend, very appreciate if we have a sample or template for this. Thanks Dharma Han Nguyen
Dear, I'm and my team are quite new for ABP Framework, we are planning to build an ERP solution based on ABP Framework. We would like to separate business function modules such as Inventory, Accounting, Sales... for each team/developers so that they can work independently and cannot see source code of each others. We also want to load the module on Main Application at runtime so that we are flexible to add new module to main application and don't need to rebuild the source code every time we add a new module. We found the guideline at https://docs.abp.io/en/abp/latest/PlugIn-Modules?_ga=2.201149294.1302224329.1667700855-81316256.1666242011 but the sample has not written for full ABP startup template of application and module. Could you please guide us how to design and resolve for that requirement and really appreciate if you have a sample using full ABP Template. Thanks Dharma
Thanks, Dharma