mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 18:47:55 +08:00
fix #I3O97D 站点启动时自动运行状态为【正在运行】的定时任务;
fix #I3ODHI 增加存储过程调用;
This commit is contained in:
28
OpenAuth.Repository/Test/TestUnitWork.cs
Normal file
28
OpenAuth.Repository/Test/TestUnitWork.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Infrastructure;
|
||||
using NUnit.Framework;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using OpenAuth.Repository.Interface;
|
||||
|
||||
namespace OpenAuth.Repository.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// 测试UnitWork
|
||||
/// </summary>
|
||||
class TestUnitWork : TestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 测试存储过程
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ExecProcedure()
|
||||
{
|
||||
var unitWork = _autofacServiceProvider.GetService<IUnitWork<OpenAuthDBContext>>();
|
||||
var users = unitWork.ExecProcedure<User>("sp_alluser");
|
||||
Console.WriteLine(JsonHelper.Instance.Serialize(users));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user