Add transaction support between services

This commit is contained in:
2025-10-27 18:09:09 +09:00
parent 6b3733001a
commit 9e526c54fa
11 changed files with 75 additions and 44 deletions

View File

@ -0,0 +1,15 @@
using Hcs.WebApp.Data.Hcs;
using Microsoft.EntityFrameworkCore;
namespace Hcs.WebApp.Services
{
public abstract class HcsServiceBase(IDbContextFactory<HcsDbContext> factory)
{
private readonly IDbContextFactory<HcsDbContext> factory = factory;
public HcsDbContext GetNewContext()
{
return factory.CreateDbContext();
}
}
}