From 5b5b4afde4598aa414bc3bd3387256945f0a303f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 5 Jun 2025 16:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API/TaskManager.EntityFramework/Repository/Repository.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/API/TaskManager.EntityFramework/Repository/Repository.cs b/API/TaskManager.EntityFramework/Repository/Repository.cs index 5bf1c6f..337188d 100644 --- a/API/TaskManager.EntityFramework/Repository/Repository.cs +++ b/API/TaskManager.EntityFramework/Repository/Repository.cs @@ -48,14 +48,10 @@ namespace TaskManager.EntityFramework.Repository public async Task UpdateAsync(TEntity entity) { - - //product 已前台更新后 - _context.Attach(entity); _context.Entry(entity).State = EntityState.Modified; - _dbSet.Update(entity); await _context.SaveChangesAsync(); }