// Restores a previously deleted material public void restoreMaterial(int materialId) { // Delete form Db MaterialModel.restoreMaterial(materialId); // Remove from deleted list and add to active list MaterialModel restoredMaterial = deletedMaterialList.Where(mat => mat.materialId == materialId).First(); deletedMaterialList.Remove(restoredMaterial); materialList.Add(restoredMaterial); originalMaterialList.Add(restoredMaterial); // Refilter the materials filterMaterials(); }