2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00

.Net 6 Upgrade

This commit is contained in:
2021-12-01 12:17:45 +03:00
parent 1166e93ba9
commit 530df018ec
164 changed files with 21247 additions and 21425 deletions

View File

@ -32,44 +32,42 @@ using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Esiur.Stores.EntityCore
namespace Esiur.Stores.EntityCore;
public class EntityResource : IResource
{
public class EntityResource : IResource
//[NotMapped]
//internal object _PrimaryId;
public event DestroyedEvent OnDestroy;
//public event PropertyChangedEventHandler PropertyChanged;
[NotMapped]
public Instance Instance { get; set; }
public EntityResource()
{
//[NotMapped]
//internal object _PrimaryId;
public event DestroyedEvent OnDestroy;
//public event PropertyChangedEventHandler PropertyChanged;
[NotMapped]
public Instance Instance { get; set; }
public EntityResource()
{
}
protected virtual void Create()
{
}
public AsyncReply<bool> Trigger(ResourceTrigger trigger)
{
if (trigger == ResourceTrigger.Initialize)
Create();
return new AsyncReply<bool>(true);
}
public void Destroy()
{
OnDestroy?.Invoke(this);
}
}
protected virtual void Create()
{
}
public AsyncReply<bool> Trigger(ResourceTrigger trigger)
{
if (trigger == ResourceTrigger.Initialize)
Create();
return new AsyncReply<bool>(true);
}
public void Destroy()
{
OnDestroy?.Invoke(this);
}
}