mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-26 21:13:13 +00:00
Source Generation
This commit is contained in:
@ -34,6 +34,7 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Esiur.Stores.EntityCore
|
||||
{
|
||||
|
||||
public class EntityResource : IResource
|
||||
{
|
||||
//[NotMapped]
|
||||
|
@ -9,9 +9,17 @@
|
||||
<Product>Esiur Entity Framework Extension</Product>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageId>Esiur.Stores.EntityCore</PackageId>
|
||||
<Version>1.0.2</Version>
|
||||
<Version>1.1.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="EntityResource.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="EntityResource.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
|
||||
<PackageReference Include="System.Collections" Version="4.3.0" />
|
||||
|
@ -76,7 +76,7 @@ namespace Esiur.Stores.EntityCore
|
||||
return cache;
|
||||
|
||||
// check if the object exists
|
||||
var obj = Warehouse.New(entityType.ClrType).Wait() as EntityResource;//, "", options.Store, null, manager);
|
||||
var obj = Warehouse.New(entityType.ClrType).Wait() as IResource;//, "", options.Store, null, manager);
|
||||
//obj._PrimaryId = id;
|
||||
options.Store.TypesByType[entityType.ClrType].PrimaryKey.SetValue(obj, id);
|
||||
Warehouse.Put(id.ToString(), obj, options.Store, null, null, 0, manager).Wait();
|
||||
|
Reference in New Issue
Block a user