Skip to content

Commit

Permalink
style: format code with dotnet-format
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 011e24d according to the output
from dotnet-format.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Feb 21, 2024
1 parent 011e24d commit 99a4190
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions src/Extensions/DesignTimeDbContextFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public virtual IConfigurationBuilder Configure(IConfigurationBuilder configBuild
public virtual SqlServerDbContextOptionsBuilder Configure(
SqlServerDbContextOptionsBuilder optionsBuilder
)
{
#if NET8_0_OR_GREATER
{
#if NET8_0_OR_GREATER
return optionsBuilder = optionsBuilder.UseAzureSqlDefaults();
#endif
#endif
return optionsBuilder;
}

Expand Down
54 changes: 27 additions & 27 deletions src/Models/Slug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ namespace Dgmjr.EntityFrameworkCore;
public readonly partial struct Slug(string Value) : IComparable<Slug>, IEquatable<Slug>, IComparable
{
public Slug()
: this(NewSlug()) { }

public string Value { get; init; } = Value;

public int CompareTo(Slug other)
=> Compare(Value, other.Value, OrdinalIgnoreCase);

public int CompareTo(object obj)
=> obj is Slug other ? CompareTo(other) : 1;

public static string NewSlug()
=> guid.NewGuid().ToString("N").Substring(0, 6).ToLowerInvariant();

public override string ToString()
=> Value;

public bool Equals(Slug other)
=> CompareTo(other) == 0;

public override bool Equals(object? obj)
=> obj is Slug other && Equals(other);

public static bool operator==(Slug left, Slug right)
=> left.Equals(right);

public static bool operator!=(Slug left, Slug right)
=> !left.Equals(right);
: this(NewSlug()) { }

public string Value { get; init; } = Value;

public int CompareTo(Slug other)
=> Compare(Value, other.Value, OrdinalIgnoreCase);

public int CompareTo(object obj)
=> obj is Slug other ? CompareTo(other) : 1;

public static string NewSlug()
=> guid.NewGuid().ToString("N").Substring(0, 6).ToLowerInvariant();

public override string ToString()
=> Value;

public bool Equals(Slug other)
=> CompareTo(other) == 0;

public override bool Equals(object? obj)
=> obj is Slug other && Equals(other);

public static bool operator ==(Slug left, Slug right)
=> left.Equals(right);

public static bool operator !=(Slug left, Slug right)
=> !left.Equals(right);
}

public class SlugEfCoreConverter : ValueConverter<Slug, string>
Expand Down

0 comments on commit 99a4190

Please sign in to comment.