mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 增加 IInsert/IUpdate BatchProgress 方法处理批量插入/更新时的进度;
This commit is contained in:
32
FreeSql/Internal/Model/BatchProgressEventArgs.cs
Normal file
32
FreeSql/Internal/Model/BatchProgressEventArgs.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
namespace FreeSql.Internal.Model
|
||||
{
|
||||
public class BatchProgressStatus<T1>
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前操作的数据
|
||||
/// </summary>
|
||||
public IEnumerable<T1> Data { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前批次
|
||||
/// </summary>
|
||||
public int Current { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 总批次数量
|
||||
/// </summary>
|
||||
public int Total { get; }
|
||||
|
||||
public BatchProgressStatus(List<T1> data, int current, int total)
|
||||
{
|
||||
this.Data = data;
|
||||
this.Current = current;
|
||||
this.Total = total;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user