Skip to content

Commit

Permalink
fix(Registration): added agreement table in update seeder (eclipse-tr…
Browse files Browse the repository at this point in the history
…actusx#1011)

Reviewed-By: Phil Schneider <[email protected]>
  • Loading branch information
dhiren-singh-007 authored Sep 19, 2024
1 parent 4f29753 commit 79b60eb
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ await SeedTable<CompanyApplication>("company_applications",
dbEntry.ChecklistProcessId = entry.ChecklistProcessId;
}, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None);

await SeedTable<Agreement>("agreements",
x => x.Id,
x => x.dataEntity.Name != x.dbEntity.Name || x.dataEntity.AgreementStatusId != x.dbEntity.AgreementStatusId,
(dbEntry, entry) =>
{
dbEntry.Name = entry.Name;
dbEntry.AgreementStatusId = entry.AgreementStatusId;
dbEntry.DateLastChanged = DateTimeOffset.UtcNow;
}, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None);

await _context.SaveChangesAsync(cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None);
_logger.LogInformation("Finished BaseEntityBatch Seeder");
}
Expand Down

0 comments on commit 79b60eb

Please sign in to comment.