Hi,
This is a problem ,we will fix it soon. thanks for you reporting. See https://github.com/abpframework/abp/pull/7165
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,
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.