Skip to content

Push code for review - #219

Open
m1nh4ke wants to merge 3 commits into
the-csharp-academy:mainfrom
m1nh4ke:main
Open

Push code for review#219
m1nh4ke wants to merge 3 commits into
the-csharp-academy:mainfrom
m1nh4ke:main

Conversation

@m1nh4ke

@m1nh4ke m1nh4ke commented Jul 6, 2026

Copy link
Copy Markdown

No description provided.

@Dejmenek Dejmenek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @m1nh4ke 👋
There's one thing missing that prevents me from reviewing your project. The database initialization is not included, so I can't run the project and proceed with the review. Could you please add it?

@m1nh4ke

m1nh4ke commented Jul 27, 2026

Copy link
Copy Markdown
Author

@Dejmenek I've added functions for database initialization. Could you please review it? Thank you.

@Dejmenek Dejmenek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making the changes👌
I've reviewed your project, and it looks good. However, there's one requirement that is still missing, which prevents me from approving the project.😔


🔴 Stack names should be unique. Currently, it's possible to create multiple stacks with the same name, which shouldn't be allowed

Image

⭐ I really like that you challenged yourself and tried to complete the additional challenge. Your solution already handles part of the requirement by displaying the number of sessions per month. The only missing piece is grouping the results by stack, so each stack has its own monthly session count. Here's how it should look like:

Image

Suggestions

I've left some comments with suggestions and ideas for improvement👍

🟡 I highly recommend moving the connection string to appsettings.json and loading it through ConfigurationBuilder/IConfiguration. This keeps configuration separate from the code and makes future changes easier, as you only need to update the value in one place instead of searching through the codebase.

🟡 I was wondering why you decided not to use Spectre.Console for this project. I think it could simplify quite a bit of the code and provide a lot of useful features that make building console applications easier. It was also used in the previous project.


Please fix the 🔴 issue, as it blocks the approval of your project. Also, feel free to reach out if you have any questions😁

Comment on lines +57 to +58
if(inp != null && (inp.Trim() == "A" || inp.Trim() == "a"))
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 After providing an invalid number and then trying to create a new stack by typing A, it's no longer possible because the input is still being treated as a number. I have to exit stack management and enter it again before I can create a new stack. The same thing applies to the FlashcardMenu file as well.

Image

Comment thread FlashcardsApp/FlashcardMenu.cs Outdated

if (isSuccess)
{
Console.WriteLine("\nCreated new stack successfully!");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 This message should say something like "Created new flashcard successfully" instead of referring to a stack.

Image

using FlashcardsApp.Models;
using FlashcardsApp.DTOs;

namespace FlashcardsApp.Repositories

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 To reduce one level of indentation, you could use file-scoped namespaces

Comment on lines +210 to +212
var newFlashcard = new Flashcard { Id = id, StackId = stackId, Front = front, Back = back };

try

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 There's no need to add blank lines between try, catch, and finally blocks.

Comment thread FlashcardsApp/StackMenu.cs Outdated
}
}

public void showStackFlashcard(FStack fstack)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 I noticed that the naming convention for methods is not consistent. In C#, the standard convention for method names is PascalCase, but in this example, camelCase was used instead. I highly recommend checking out this article about C# code conventions: https://thecsharpacademy.com/article/58/code-conventions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants