- About
-
-
+
+
+
+
Global List
@@ -59,13 +60,17 @@
@foreach (var Entity in GlobalEntities)
{
+
@code
@@ -268,4 +291,24 @@
GenreIds.Add(GenreId);
}
}
+
+ private async Task DeleteEntity(GlobalEntity entity)
+ {
+ if(entity.PicturePath != null)
+ {
+ try
+ {
+ File.Delete(Path.Combine("wwwroot", entity.PicturePath));
+ }
+ catch(Exception)
+ {
+ }
+ }
+
+ CouchLogDB.GlobalEntities.Remove(entity);
+
+ await CouchLogDB.SaveChangesAsync();
+
+ NavigationManager.NavigateTo(NavigationManager.Uri, true);
+ }
}
\ No newline at end of file
diff --git a/CouchLog/CouchLog.csproj b/CouchLog/CouchLog.csproj
index 4b41fba..cddb734 100644
--- a/CouchLog/CouchLog.csproj
+++ b/CouchLog/CouchLog.csproj
@@ -58,21 +58,22 @@
-
+
+
}
-
+
+
+