Update common registries page

This commit is contained in:
2025-10-23 10:56:11 +09:00
parent ddb92ccd5b
commit 0626ce0176
12 changed files with 490 additions and 57 deletions

View File

@ -0,0 +1,18 @@
using Hcs.WebApp.Data.Hcs;
using Microsoft.EntityFrameworkCore;
namespace Hcs.WebApp.Services
{
public class RegistryService(IDbContextFactory<HcsDbContext> factory)
{
private readonly IDbContextFactory<HcsDbContext> factory = factory;
public async Task<IEnumerable<Registry>> GetAllRegistries(bool isCommon)
{
using var context = factory.CreateDbContext();
return await (from registry in context.Registries
where registry.IsCommon == isCommon
select registry).ToListAsync();
}
}
}