33 lines
766 B
C#
33 lines
766 B
C#
using Dlhis.Middle.Entities;
|
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Dlhis.Middle.Controllers;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class CurrentController : ControllerBase
|
|
{
|
|
private readonly IDbContext _dbContext;
|
|
|
|
public CurrentController(IDbContext dbContext)
|
|
{
|
|
_dbContext = dbContext;
|
|
}
|
|
|
|
|
|
[HttpGet("gainfos")]
|
|
public async Task<object> GetGainfosAsync()
|
|
{
|
|
return await _dbContext.Queryable<LocalGainfoEntity>().ToListAsync();
|
|
}
|
|
|
|
[HttpGet("gainfoMeals")]
|
|
public async Task<object> GetGainfoMealsAsync()
|
|
{
|
|
return await _dbContext.Queryable<LocalGainfoMealEntity>().ToListAsync();
|
|
}
|
|
} |