From 3a1fcedc9f8789d8238762ca606a6436d90615e8 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Mon, 22 Jan 2024 20:43:10 +0800 Subject: [PATCH] 1 --- .../AggregateRootRepository/AggregateRootRepository.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Extensions/FreeSql.Extensions.AggregateRoot/AggregateRootRepository/AggregateRootRepository.cs b/Extensions/FreeSql.Extensions.AggregateRoot/AggregateRootRepository/AggregateRootRepository.cs index 7f7d571f..d13b56f3 100644 --- a/Extensions/FreeSql.Extensions.AggregateRoot/AggregateRootRepository/AggregateRootRepository.cs +++ b/Extensions/FreeSql.Extensions.AggregateRoot/AggregateRootRepository/AggregateRootRepository.cs @@ -79,8 +79,10 @@ namespace FreeSql public void Attach(TEntity entity) { var state = CreateEntityState(entity); - if (_states.ContainsKey(state.Key)) _states[state.Key] = state; - else _states.Add(state.Key, state); + if (_states.ContainsKey(state.Key)) + _states[state.Key] = state; + else + _states.Add(state.Key, state); } public void Attach(IEnumerable entity) {