update
This commit is contained in:
@@ -6,7 +6,9 @@ public class JsonDataManager(JsonDataContainer container) : DataManager
|
|||||||
|
|
||||||
protected override T? FindEntity<T>(int id) where T : class
|
protected override T? FindEntity<T>(int id) where T : class
|
||||||
{
|
{
|
||||||
return container.Set<T>(false)?.FirstOrDefault(n => n.Id.Equals(id));
|
if (id == 0)
|
||||||
|
return null;
|
||||||
|
return container.Set<T>(false)?.FirstOrDefault(n => n.Id == id);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IQueryable<T> GetEntitySet<T>()
|
protected override IQueryable<T> GetEntitySet<T>()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>annotations</Nullable>
|
<Nullable>annotations</Nullable>
|
||||||
<Version>2.4.4</Version>
|
<Version>2.4.5</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user