using EFCore7Study.DataService; using EFCore7Study.DataService.Models; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Internal; namespace EFCore7Study.WebApi.Controllers { [Route("api/[controller]/[action]")] [ApiController] public class EFCore3Controller : ControllerBase { private readonly IDbContextFactory _contextFactory; public EFCore3Controller(IDbContextFactory contextFactory) { _contextFactory = contextFactory; } [HttpGet] public List GetAll() { return _contextFactory.CreateDbContext().Accounts.ToList(); } [HttpGet] public List GetAll2() { return _contextFactory.CreateDbContext().Accounts.ToList(); } [HttpGet] public List GetAll3() { return _contextFactory.CreateDbContext().Accounts.ToList(); } [HttpGet] public List GetAll4() { return _contextFactory.CreateDbContext().Accounts.ToList(); } [HttpGet] public List GetAll5() { return _contextFactory.CreateDbContext().Accounts.ToList(); } [HttpGet] public List GetAll6() { return _contextFactory.CreateDbContext().Accounts.ToList(); } } }