mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-05-08 22:58:06 +08:00
28 lines
733 B
C#
28 lines
733 B
C#
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));
|
|
}
|
|
|
|
}
|
|
} |