diff --git a/projects/Infrastructure/Web/Mvc/CrudController.cs b/projects/Infrastructure/Web/Mvc/CrudController.cs index e7bcea4b..2605744c 100644 --- a/projects/Infrastructure/Web/Mvc/CrudController.cs +++ b/projects/Infrastructure/Web/Mvc/CrudController.cs @@ -236,8 +236,8 @@ namespace Infrastructure.Web.Mvc var query = this.Repo.Table(); var entity = query.FirstOrDefault(o => o.Id == id); this.Repo.Delete(entity); + this.Repo.SaveChanges(); } - this.Repo.SaveChanges(); this.AfterDelete(list); return Success(); }