Skip to content

Commit

Permalink
expression body
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad committed Nov 12, 2024
1 parent 5d56f44 commit 7b28f54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
4 changes: 1 addition & 3 deletions src/Digdir.Domain.Dialogporten.Infrastructure/UnitOfWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ public IUnitOfWork WithoutAggregateSideEffects()
}

public async Task BeginTransactionAsync(CancellationToken cancellationToken = default)
{
_transaction ??= await _dialogDbContext.Database.BeginTransactionAsync(cancellationToken);
}
=> _transaction ??= await _dialogDbContext.Database.BeginTransactionAsync(cancellationToken);

public async Task<SaveChangesResult> SaveChangesAsync(CancellationToken cancellationToken = default)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ public static Guid CreateVersion7IfDefault(this Guid value) =>
/// Creates a new version 7 UUID.
/// </summary>
/// <returns>A new version 7 UUID in big endian format.</returns>
public static Guid CreateVersion7()
{
public static Guid CreateVersion7() =>
// We want Guids in big endian format. The default behavior of Medo is big endian,
// however, the implicit conversion from Medo.Uuid7 to Guid is little endian.
// "matchGuidEndianness" is set to true to ensure big endian.
return Uuid7.NewUuid7().ToGuid(matchGuidEndianness: true);
}
Uuid7.NewUuid7().ToGuid(matchGuidEndianness: true);
}
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,7 @@ public static List<ApiActionEndpointDto> GenerateFakeDialogApiActionEndpoints()
.Generate(new Randomizer().Number(min: 1, 4));
}

public static string GenerateFakeProcessUri()
{
return new Faker().Internet.UrlWithPath(Uri.UriSchemeHttps);
}
public static string GenerateFakeProcessUri() => new Faker().Internet.UrlWithPath(Uri.UriSchemeHttps);

public static List<GuiActionDto> GenerateFakeDialogGuiActions()
{
Expand Down

0 comments on commit 7b28f54

Please sign in to comment.