修改批量导入变量返回实体,防止Io为0的问题
This commit is contained in:
@@ -103,9 +103,10 @@ public class DeviceRepository : BaseRepository<DbDevice>, IDeviceRepository
|
||||
|
||||
}
|
||||
|
||||
public Task<bool> AddBatchAsync(List<Device> entities)
|
||||
public async Task<List<Device>> AddBatchAsync(List<Device> entities)
|
||||
{
|
||||
var dbEntities = _mapper.Map<List<DbDevice>>(entities);
|
||||
return base.AddBatchAsync(dbEntities);
|
||||
var addedEntities = await base.AddBatchAsync(dbEntities);
|
||||
return _mapper.Map<List<Device>>(addedEntities);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user