mirror of
https://github.com/dotnetcore/Util.git
synced 2026-10-20 06:07:17 +08:00
26 lines
876 B
C#
26 lines
876 B
C#
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Util.Data.EntityFrameworkCore;
|
|
using Util.Sessions;
|
|
|
|
namespace Util.Tests.UnitOfWorks {
|
|
/// <summary>
|
|
/// SqlServer工作单元
|
|
/// </summary>
|
|
public class SqlServerUnitOfWork : SqlServerUnitOfWorkBase, ITestUnitOfWork, ITestUnitOfWork2 {
|
|
/// <summary>
|
|
/// 初始化工作单元
|
|
/// </summary>
|
|
/// <param name="serviceProvider">服务提供器</param>
|
|
/// <param name="options">配置项</param>
|
|
public SqlServerUnitOfWork( IServiceProvider serviceProvider ,DbContextOptions<SqlServerUnitOfWork> options) : base( serviceProvider, options ) {
|
|
}
|
|
|
|
/// <summary>
|
|
/// 设置用户会话
|
|
/// </summary>
|
|
public void SetSession( ISession session ) {
|
|
Session = session;
|
|
}
|
|
}
|
|
} |