Activities of "liangshiwei"

Hi,

You should download the source code of the rel-4.1 branch instead of dev branch

Can I check it remotely?(UTC+8) shiwei.liang@volosoft.com

Hi,

Have you tried my suggestion?

Hi,

As hikalkan said, your sql execution may not be in the transaction. Below is my test code and it works fine:

public class TestAppService : ApplicationService
{
    private readonly IMyRepository _myRepository;

    public TestAppService(IMyRepository myRepository)
    {
        _myRepository = myRepository;
    }

    public async Task UpdateManyAsync()
    {
        var roleIds = (await _myRepository.GetListAsync()).Select(x => x.Id).ToArray();

        await _myRepository.UpdateManyAsync(roleIds);

        await CurrentUnitOfWork.SaveChangesAsync();

        throw new UserFriendlyException("test exception");
    }
}

public class MyRepository : EfCoreRepository<IdentityDbContext, IdentityRole, Guid>, IMyRepository
{
    public MyRepository(IDbContextProvider<IdentityDbContext> dbContextProvider) : base(dbContextProvider)
    {
    }

    public async Task UpdateManyAsync(Guid[] ids)
    {
        var parameter =  string.Join(',',ids.Select(x => $"'{x}'").ToList());
        await DbContext.Database.ExecuteSqlRawAsync(
            $"update AbpRoles set IsPublic = 1 where id in ({parameter})");
    }
}

Hi,

I make an example and hope can help you: https://github.com/realLiangshiwei/Qa727

Hi,

How to reproduce this problem? can you provide steps? thanks.

Hi,

How to reproduce the problem?

I will check it out

The problem has been solve, if you have any question, please reopen.

Why, ABP create them automatically right?? if i follow the BookStore Tutorial then it is all automatic no need to create API Controller

Because the module template is different from the app template. It is microservice compatible

If i have to create a APIController in what project ?

In *.HttpApi project.

Showing 6021 to 6030 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 December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.