You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
977 B
32 lines
977 B
using BBWY.Server.Business;
|
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Data;
|
|
|
|
namespace BBWY.Server.API.Controllers
|
|
{
|
|
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
|
|
public class SqlController : BaseApiController
|
|
{
|
|
private SqlBusiness sqlBusiness;
|
|
|
|
public SqlController(IHttpContextAccessor httpContextAccessor, SqlBusiness sqlBusiness) : base(httpContextAccessor)
|
|
{
|
|
this.sqlBusiness = sqlBusiness;
|
|
}
|
|
|
|
[HttpPost]
|
|
public int ExecuteNonQuery([FromBody]BaseSqlData baseSqlData)
|
|
{
|
|
return sqlBusiness.ExecuteNonQuery(baseSqlData);
|
|
}
|
|
|
|
[HttpPost]
|
|
public DataTable ExecuteDataTable([FromBody] BaseSqlData baseSqlData)
|
|
{
|
|
return sqlBusiness.ExecuteDataTable(baseSqlData);
|
|
}
|
|
}
|
|
}
|
|
|