给应用添加图标,完成给设备添加变量表的功能
This commit is contained in:
@@ -40,7 +40,7 @@ public class MenuRepository
|
||||
}
|
||||
|
||||
|
||||
public async Task<int> AddMenu(MenuBean menu)
|
||||
public async Task<int> Add(MenuBean menu)
|
||||
{
|
||||
using (var db = DbContext.GetInstance())
|
||||
{
|
||||
|
||||
21
Data/Repositories/VarTableRepository.cs
Normal file
21
Data/Repositories/VarTableRepository.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using PMSWPF.Data.Entities;
|
||||
using PMSWPF.Extensions;
|
||||
using PMSWPF.Models;
|
||||
|
||||
namespace PMSWPF.Data.Repositories;
|
||||
|
||||
public class VarTableRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 添加变量表
|
||||
/// </summary>
|
||||
/// <param name="varTable"></param>
|
||||
/// <returns>变量表的ID</returns>
|
||||
public async Task<int> Add(VariableTable varTable)
|
||||
{
|
||||
using (var db = DbContext.GetInstance())
|
||||
{
|
||||
return await db.Insertable<DbVariableTable>(varTable.CopyTo<DbVariableTable>()).ExecuteReturnIdentityAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user