Add houses page

This commit is contained in:
2025-11-13 10:00:49 +09:00
parent b5e5b0ecd2
commit 579ba42fa8
4 changed files with 222 additions and 1 deletions

View File

@ -0,0 +1,14 @@
using Hcs.WebApp.Data.Hcs;
using Microsoft.EntityFrameworkCore;
namespace Hcs.WebApp.Services
{
public class HouseService(IDbContextFactory<HcsDbContext> factory) : HcsServiceBase(factory)
{
public async Task<IEnumerable<House>> GetAllHousesAsync()
{
using var context = GetNewContext();
return await context.Houses.ToListAsync();
}
}
}