refactor(infrastructure): rename CreateAsync bulk overload to CreateRangeAsync and use AsNoTracking in ReceivedEmailRepository

This commit is contained in:
2026-08-13 16:48:34 +02:00
parent 6abe0e18f6
commit 578ecc7ba1
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ public class Repository<TEntity>(MessagingServiceDbContext Context, IMapper Mapp
return entity;
}
public async Task<IEnumerable<TEntity>> CreateAsync<TDto>(IEnumerable<TDto> dtos, CancellationToken cancellationToken = default)
public async Task<IEnumerable<TEntity>> CreateRangeAsync<TDto>(IEnumerable<TDto> dtos, CancellationToken cancellationToken = default)
{
var entities = Mapper.Map<IEnumerable<TEntity>>(dtos);
await DbSet.AddRangeAsync(entities, cancellationToken);