diff --git a/ImageBoardServerApp/Data/CommentData.cs b/ImageBoardServerApp/Data/CommentData.cs
index 782450c..bcaf8a1 100644
--- a/ImageBoardServerApp/Data/CommentData.cs
+++ b/ImageBoardServerApp/Data/CommentData.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using System.Diagnostics.CodeAnalysis;
using ImageBoardServerApp.Shared.Components;
namespace ImageBoardServerApp.Data;
@@ -24,9 +25,9 @@ public class CommentData
public virtual UserData User { get; set; }
//[ForeignKey("ImageID")]
- public virtual ImageData Image { get; set; }
-
- public int ImageID { get; set; }
+ public virtual ImageData? Image { get; set; }
+
+ public int? ImageID { get; set; }
[Required]
public string Content { get; set; }
diff --git a/ImageBoardServerApp/ImageBoardServerApp.csproj b/ImageBoardServerApp/ImageBoardServerApp.csproj
index ef2c7bc..4dda036 100644
--- a/ImageBoardServerApp/ImageBoardServerApp.csproj
+++ b/ImageBoardServerApp/ImageBoardServerApp.csproj
@@ -22,4 +22,9 @@
+
+
+
+
+
diff --git a/ImageBoardServerApp/Pages/Index.razor b/ImageBoardServerApp/Pages/Index.razor
index 292616f..e3fd3ad 100644
--- a/ImageBoardServerApp/Pages/Index.razor
+++ b/ImageBoardServerApp/Pages/Index.razor
@@ -1,9 +1,23 @@
@page "/"
+@using ImageBoardServerApp.Data.Repository
BulletBoard
-
- This is a simple Imageboard made in Razor.
-
-
-
-
\ No newline at end of file
+This is a simple Imageboard made in Razor.
+
+We're currently hosting @amountOfPosts Threads with @amountOfComments Comments from @amountOfUsers Users.
+
+@code{
+ private int amountOfPosts = -1;
+ private int amountOfComments = -1;
+ private int amountOfUsers = -1;
+ protected override async Task OnInitializedAsync()
+ {
+ var posts = await PostsRepository.getPostsAsync();
+ amountOfPosts = posts.Count;
+ var comments = await CommentsRepository.getCommentsAsync();
+ amountOfComments = comments.Count;
+ var users = await UsersRepository.getUsersAsync();
+ amountOfUsers = users.Count;
+ }
+
+}
\ No newline at end of file
diff --git a/ImageBoardServerApp/Shared/Components/Comment.razor b/ImageBoardServerApp/Shared/Components/Comment.razor
index 2bf523c..8b54619 100644
--- a/ImageBoardServerApp/Shared/Components/Comment.razor
+++ b/ImageBoardServerApp/Shared/Components/Comment.razor
@@ -1,5 +1,6 @@
@using System.ComponentModel.DataAnnotations
@using ImageBoardServerApp.Data
+@using ImageBoardServerApp.Data.Repository