10 changed files with 1 additions and 43 deletions
@ -1,6 +0,0 @@ |
|||
namespace Lion.AbpPro.Users; |
|||
|
|||
public interface IBulkImportUserRepository : ITransientDependency |
|||
{ |
|||
Task BulkInsertAsync(List<IdentityUser> identityUsers); |
|||
} |
|||
@ -1,18 +0,0 @@ |
|||
namespace Lion.AbpPro.EntityFrameworkCore; |
|||
|
|||
public class BulkImportUserRepository:IBulkImportUserRepository |
|||
{ |
|||
private readonly IDbContextProvider<AbpProDbContext> _contextProvider; |
|||
|
|||
public BulkImportUserRepository(IDbContextProvider<AbpProDbContext> contextProvider) |
|||
{ |
|||
_contextProvider = contextProvider; |
|||
} |
|||
|
|||
public async Task BulkInsertAsync(List<IdentityUser> identityUsers) |
|||
{ |
|||
// TODO 这个地方创建人和创建时间需要手动赋值。
|
|||
var context = await _contextProvider.GetDbContextAsync(); |
|||
await context.BulkInsertAsync(identityUsers, context.Database.CurrentTransaction.GetDbTransaction() as MySqlTransaction); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue