From 4695c7d371e91ee5a7228d80c6f15aca1ab7a410 Mon Sep 17 00:00:00 2001 From: Takasakiii Date: Tue, 7 Nov 2023 13:06:21 -0300 Subject: [PATCH 1/3] add: clone entity --- Lina/Database/Models/BaseEntity.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lina/Database/Models/BaseEntity.cs b/Lina/Database/Models/BaseEntity.cs index 947fd0f..24aa97b 100644 --- a/Lina/Database/Models/BaseEntity.cs +++ b/Lina/Database/Models/BaseEntity.cs @@ -10,4 +10,10 @@ public abstract class BaseEntity /// Entity id /// public TPkType Id { get; set; } = default!; + + public T Clone() + where T: BaseEntity + { + return (T)MemberwiseClone(); + } } \ No newline at end of file From 02181baac8a7af9cbc05f5365f48c3a3f4e211b5 Mon Sep 17 00:00:00 2001 From: Takasakiii Date: Tue, 7 Nov 2023 13:07:17 -0300 Subject: [PATCH 2/3] update version and update dependencies --- Lina.Test/Lina.Test.csproj | 2 +- Lina/Lina.csproj | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Lina.Test/Lina.Test.csproj b/Lina.Test/Lina.Test.csproj index 584ae63..1083b27 100644 --- a/Lina.Test/Lina.Test.csproj +++ b/Lina.Test/Lina.Test.csproj @@ -9,7 +9,7 @@ - + diff --git a/Lina/Lina.csproj b/Lina/Lina.csproj index fcc9c66..1501c6d 100644 --- a/Lina/Lina.csproj +++ b/Lina/Lina.csproj @@ -5,7 +5,7 @@ enable enable true - 1.2.2 + 1.2.3 TakasakiStudio.Lina TakasakiStudio https://github.com/Takasaki-Studio/Lina @@ -17,8 +17,8 @@ - - + + From db799160158a5038adf2c4c3ef11373c58bf368b Mon Sep 17 00:00:00 2001 From: Takasakiii Date: Tue, 7 Nov 2023 13:12:43 -0300 Subject: [PATCH 3/3] change version --- Lina/Lina.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lina/Lina.csproj b/Lina/Lina.csproj index 1501c6d..7c184af 100644 --- a/Lina/Lina.csproj +++ b/Lina/Lina.csproj @@ -5,7 +5,7 @@ enable enable true - 1.2.3 + 1.2.4 TakasakiStudio.Lina TakasakiStudio https://github.com/Takasaki-Studio/Lina