Files
hcs/Hcs.WebApp/Services/HcsServiceBase.cs

16 lines
383 B
C#

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();
}
}
}