Activities of "liangshiwei"

Hi,

Not actually.

Like I've been explaining, this has nothing to do with ABP.

Hi,

You can try upgrading your Docker Desktop version and try again.

It's just trying to pull the redis image

Hi,

This error does not come from ABP but EF core. ABP just catches and re-throw it.

https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs#L255

Like I've already explained, https://abp.io/support/questions/9047/IHasConcurrencyStamp-AbpDbConcurrencyException---Doesn%27t-work#answer-3a1902be-7ff3-3481-c5c7-9cd0685025bc

You can reproduce it using only a simple .NET Core application without ABP.

using ConcurrencyDemo.Data;
using ConcurrencyDemo.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();

services.AddDbContext<AppDbContext>(options =>
    options.UseSqlite("Data Source=ConcurrencyDemo.db"));

var serviceProvider = services.BuildServiceProvider();
var dbContext = serviceProvider.GetRequiredService<AppDbContext>();

// make sure the database is created
dbContext.Database.EnsureCreated();

// create a product
var product = new Product { Id =1 , Name = "Test Product", Price = 100 };
dbContext.Products.Add(product);
await dbContext.SaveChangesAsync();

Console.WriteLine("Initial product created: " + product.Name);

// create two tasks to simulate concurrent operations
var deleteTask = Task.Run(async () =>
{
    
    using var scope = serviceProvider.CreateScope();
    var deleteContext = scope.ServiceProvider.GetRequiredService<AppDbContext>();
    
    var productToDelete = await deleteContext.Products.FindAsync(1);
    await Task.Delay(100);
    if (productToDelete != null)
    {
        deleteContext.Products.Remove(productToDelete);
        await deleteContext.SaveChangesAsync();
        Console.WriteLine("delete operation completed");
    }
});

var updateTask = Task.Run(async () =>
{
    using var scope = serviceProvider.CreateScope();
    var updateContext = scope.ServiceProvider.GetRequiredService<AppDbContext>();
    
    var productToUpdate = await updateContext.Products.FindAsync(1);
    if (productToUpdate != null)
    {
        productToUpdate.Price = 200;
        
        // wait for a while to simulate a delay
        await Task.Delay(1000);
        
        try
        {
            await updateContext.SaveChangesAsync();
            Console.WriteLine("update operation completed");
        }
        catch (DbUpdateConcurrencyException e)
        {
            Console.WriteLine(e.Message);
        }
    }
});

// wait for both tasks to complete
await Task.WhenAll(deleteTask, updateTask);

Console.WriteLine("All operations completed. Press any key to exit.");

ok

It is available

You can try add <PackageReference Include="Volo.Abp.LeptonXTheme.Management.Domain.Shared" Version="4.2.0-rc.1" /> to your domain.shared project's csproj

It is available in ABP NuGet.

Please share the domain.shared project's csproj content, thanks.

share the domain.shared project's csproj content thanks.

Hi,

This is actually due to EF Core's state management.

EF Core tracks entities and throws an exception when they are concurrently modified. You can catch the error and ignore the exception, just like ABP Chat module did.

But if data accuracy and order are important, you can use lock to ensure that resources are not concurrently modified or deleted.

Showing 61 to 70 of 6693 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 30, 2025, 06:33