mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(services): 🐛 resolve nullable ref type warnings
This commit is contained in:
parent
1536569eda
commit
d0f95a112e
2 changed files with 11 additions and 3 deletions
|
|
@ -17,9 +17,14 @@ protected static bool NotEqualOperator(ValueObject left, ValueObject right)
|
|||
|
||||
protected abstract IEnumerable<object> GetEqualityComponents();
|
||||
|
||||
public override bool Equals(object obj)
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj?.GetType() != GetType())
|
||||
if (obj is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (obj.GetType() != GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,10 @@ public static void HasDataJsonFile<TEntity>(this EntityTypeBuilder entityTypeBui
|
|||
var entities = JsonSerializer.Deserialize<IEnumerable<TEntity>>(entitiesJson,
|
||||
new JsonSerializerOptions {PropertyNamingPolicy = JsonNamingPolicy.CamelCase});
|
||||
|
||||
entityTypeBuilder.HasData((IEnumerable<object>)entities);
|
||||
if (entities != null)
|
||||
{
|
||||
entityTypeBuilder.HasData((IEnumerable<object>)entities);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue