public async ValueTask <IActionResult> CategoryMoveToTrash(string name) { await categoriesAdminManager.CategoryMoveToTrashAsync(name); categoriesCache.Reset(); contentCache.Reset(); return(Ok()); }
public async void ShouldMoveCategoryToTrash() { var category = DefaultCategory; using (dbConnection.BeginTransaction()) { await categoryAdminManager.CreateCategoryAsync(category); await categoryAdminManager.CategoryMoveToTrashAsync(category.Name); var result = dbConnection.Categories.FirstOrDefault(x => x.Name == category.Name); Assert.NotNull(result); Assert.True(result.DeletedDate != null); } }