1234567891011121314151617181920212223242526272829303132333435 |
- using Dapper;
- using Microsoft.AspNetCore.Mvc;
- using MySqlX.XDevAPI.Common;
- using Newtonsoft.Json;
- using PullChargeData.Entity;
- using PullChargeData.Helper;
- using System.Data;
- namespace DataControlMod.Controllers
- {
- [ApiController]
- [Route("[controller]")]
- public class InputDataModifyController : ControllerBase
- {
- private readonly ILogger<InputDataModifyController> _logger;
- public InputDataModifyController(ILogger<InputDataModifyController> logger)
- {
- _logger = logger;
- }
- [HttpPost(Name = "newOpenApi/search")]
- public dynamic ExamApi(dynamic inputData)
- {
- using (IDbConnection conn = DapperHelper.MySqlConnection())
- {
- string sql = "select * from datasourceinfo";
- var dynamicParams = new DynamicParameters();
- var result = conn.Query<datasourceinfo>(sql, dynamicParams).ToList();
- return result;
- }
- }
- }
- }
|