diff --git a/Bootstrap.Admin/Controllers/Api/CategoryController.cs b/Bootstrap.Admin/Controllers/Api/CategoryController.cs
index 83526843..afaf0754 100644
--- a/Bootstrap.Admin/Controllers/Api/CategoryController.cs
+++ b/Bootstrap.Admin/Controllers/Api/CategoryController.cs
@@ -9,7 +9,8 @@ namespace Bootstrap.Admin.Controllers.Api
/// 数据字典分类
///
[Route("api/[controller]")]
- public class CategoryController : Controller
+ [ApiController]
+ public class CategoryController : ControllerBase
{
///
/// 获取字典表中所有Category数据
diff --git a/Bootstrap.Admin/Controllers/Api/DictsController.cs b/Bootstrap.Admin/Controllers/Api/DictsController.cs
index 85666a5c..a88f89e1 100644
--- a/Bootstrap.Admin/Controllers/Api/DictsController.cs
+++ b/Bootstrap.Admin/Controllers/Api/DictsController.cs
@@ -12,7 +12,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class DictsController : Controller
+ [ApiController]
+ public class DictsController : ControllerBase
{
///
///
@@ -20,7 +21,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[HttpGet]
- public QueryData Get(QueryDictOption value)
+ public QueryData Get([FromQuery]QueryDictOption value)
{
return value.RetrieveData();
}
diff --git a/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs b/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs
index 2d697b97..aeb509ce 100644
--- a/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs
+++ b/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs
@@ -13,7 +13,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class ExceptionsController : Controller
+ [ApiController]
+ public class ExceptionsController : ControllerBase
{
///
/// 显示所有异常
@@ -21,7 +22,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[HttpGet]
- public QueryData
[Route("api/[controller]")]
- public class GroupsController : Controller
+ [ApiController]
+ public class GroupsController : ControllerBase
{
///
///
@@ -19,7 +20,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[HttpGet]
- public QueryData Get(QueryGroupOption value)
+ public QueryData Get([FromQuery]QueryGroupOption value)
{
return value.RetrieveData();
}
diff --git a/Bootstrap.Admin/Controllers/Api/InterfaceController.cs b/Bootstrap.Admin/Controllers/Api/InterfaceController.cs
index d7f18dad..586ef354 100644
--- a/Bootstrap.Admin/Controllers/Api/InterfaceController.cs
+++ b/Bootstrap.Admin/Controllers/Api/InterfaceController.cs
@@ -11,7 +11,8 @@ namespace Bootstrap.Admin.Controllers
///
[Route("api/[controller]/[action]")]
[AllowAnonymous]
- public class InterfaceController : Controller
+ [ApiController]
+ public class InterfaceController : ControllerBase
{
///
///
diff --git a/Bootstrap.Admin/Controllers/Api/LoginController.cs b/Bootstrap.Admin/Controllers/Api/LoginController.cs
index 3339ba6b..d4a3a258 100644
--- a/Bootstrap.Admin/Controllers/Api/LoginController.cs
+++ b/Bootstrap.Admin/Controllers/Api/LoginController.cs
@@ -13,7 +13,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class LoginController : Controller
+ [ApiController]
+ public class LoginController : ControllerBase
{
///
///
diff --git a/Bootstrap.Admin/Controllers/Api/LogsController.cs b/Bootstrap.Admin/Controllers/Api/LogsController.cs
index 55a95f90..f0fdb56b 100644
--- a/Bootstrap.Admin/Controllers/Api/LogsController.cs
+++ b/Bootstrap.Admin/Controllers/Api/LogsController.cs
@@ -10,7 +10,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class LogsController : Controller
+ [ApiController]
+ public class LogsController : ControllerBase
{
///
///
@@ -18,7 +19,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[HttpGet]
- public QueryData Get(QueryLogOption value)
+ public QueryData Get([FromQuery]QueryLogOption value)
{
return value.RetrieveData();
}
diff --git a/Bootstrap.Admin/Controllers/Api/MenusController.cs b/Bootstrap.Admin/Controllers/Api/MenusController.cs
index 46391284..5ea99569 100644
--- a/Bootstrap.Admin/Controllers/Api/MenusController.cs
+++ b/Bootstrap.Admin/Controllers/Api/MenusController.cs
@@ -11,7 +11,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class MenusController : Controller
+ [ApiController]
+ public class MenusController : ControllerBase
{
///
/// 获得所有菜单列表调用
@@ -19,7 +20,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[HttpGet]
- public QueryData Get(QueryMenuOption value)
+ public QueryData Get([FromQuery]QueryMenuOption value)
{
return value.RetrieveData(User.Identity.Name);
}
diff --git a/Bootstrap.Admin/Controllers/Api/MessagesController.cs b/Bootstrap.Admin/Controllers/Api/MessagesController.cs
index 3bc112e5..e6d76995 100644
--- a/Bootstrap.Admin/Controllers/Api/MessagesController.cs
+++ b/Bootstrap.Admin/Controllers/Api/MessagesController.cs
@@ -11,7 +11,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class MessagesController : Controller
+ [ApiController]
+ public class MessagesController : ControllerBase
{
///
/// 根据Id返回不同的消息列表
diff --git a/Bootstrap.Admin/Controllers/Api/NewController.cs b/Bootstrap.Admin/Controllers/Api/NewController.cs
index 603af6b2..aeac82a0 100644
--- a/Bootstrap.Admin/Controllers/Api/NewController.cs
+++ b/Bootstrap.Admin/Controllers/Api/NewController.cs
@@ -9,7 +9,8 @@ namespace Bootstrap.Admin.Controllers
///
///
[Route("api/[controller]")]
- public class NewController : Controller
+ [ApiController]
+ public class NewController : ControllerBase
{
///
/// 通知管理页面获得所有新用户方法调用
diff --git a/Bootstrap.Admin/Controllers/Api/NotificationsController.cs b/Bootstrap.Admin/Controllers/Api/NotificationsController.cs
index 543731dd..886ab404 100644
--- a/Bootstrap.Admin/Controllers/Api/NotificationsController.cs
+++ b/Bootstrap.Admin/Controllers/Api/NotificationsController.cs
@@ -9,7 +9,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class NotificationsController : Controller
+ [ApiController]
+ public class NotificationsController : ControllerBase
{
///
///
diff --git a/Bootstrap.Admin/Controllers/Api/ProfilesController.cs b/Bootstrap.Admin/Controllers/Api/ProfilesController.cs
index dc460a4c..82d06c22 100644
--- a/Bootstrap.Admin/Controllers/Api/ProfilesController.cs
+++ b/Bootstrap.Admin/Controllers/Api/ProfilesController.cs
@@ -12,7 +12,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class ProfilesController : Controller
+ [ApiController]
+ public class ProfilesController : ControllerBase
{
///
///
diff --git a/Bootstrap.Admin/Controllers/Api/RolesController.cs b/Bootstrap.Admin/Controllers/Api/RolesController.cs
index 7b716e92..0fc7d618 100644
--- a/Bootstrap.Admin/Controllers/Api/RolesController.cs
+++ b/Bootstrap.Admin/Controllers/Api/RolesController.cs
@@ -12,7 +12,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class RolesController : Controller
+ [ApiController]
+ public class RolesController : ControllerBase
{
///
///
@@ -20,7 +21,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[HttpGet]
- public QueryData Get(QueryRoleOption value)
+ public QueryData Get([FromQuery]QueryRoleOption value)
{
return value.RetrieveData();
}
diff --git a/Bootstrap.Admin/Controllers/Api/SettingsController.cs b/Bootstrap.Admin/Controllers/Api/SettingsController.cs
index 8f624f2d..f0a0e23a 100644
--- a/Bootstrap.Admin/Controllers/Api/SettingsController.cs
+++ b/Bootstrap.Admin/Controllers/Api/SettingsController.cs
@@ -10,7 +10,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class SettingsController : Controller
+ [ApiController]
+ public class SettingsController : ControllerBase
{
///
///
diff --git a/Bootstrap.Admin/Controllers/Api/TasksController.cs b/Bootstrap.Admin/Controllers/Api/TasksController.cs
index a089a977..02fdd788 100644
--- a/Bootstrap.Admin/Controllers/Api/TasksController.cs
+++ b/Bootstrap.Admin/Controllers/Api/TasksController.cs
@@ -8,7 +8,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class TasksController : Controller
+ [ApiController]
+ public class TasksController : ControllerBase
{
///
///
diff --git a/Bootstrap.Admin/Controllers/Api/UsersController.cs b/Bootstrap.Admin/Controllers/Api/UsersController.cs
index 132a5cda..7d076a9d 100644
--- a/Bootstrap.Admin/Controllers/Api/UsersController.cs
+++ b/Bootstrap.Admin/Controllers/Api/UsersController.cs
@@ -13,7 +13,8 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[Route("api/[controller]")]
- public class UsersController : Controller
+ [ApiController]
+ public class UsersController : ControllerBase
{
///
///
@@ -21,7 +22,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
///
[HttpGet]
- public QueryData Get(QueryUserOption value)
+ public QueryData Get([FromQuery]QueryUserOption value)
{
return value.RetrieveData();
}