To answer this specifically
Is it acceptable if I post a link to an external repo for cloning
Yes, if you do so only as an additional way for people to get the code. Any code that you expect to be reviewed should be present in the question body with enough context (other code) to see how it is used. The context can be in the form of tests, a custom written (just for the question) demo, or your actual code. If you wrote the code for the question, please state that.
If you post a repo link, it should be to a specific point that matches the code in the question, not to the constantly changing current version. It is acceptable to post both links (snapshot and always current version) if they are clearly identified.
how much code do I post in the question body? Anything at all? Just any parts that need extra attention and scrutiny?
If possible, all of it. We have an expanded 60k character limit for that reason.
If your code is longer than will fit in the question (figure 50k characters or so to allow for a problem statement, etc.), then pick the aspect that you want reviewed. Post all of that code. Then post any additional code that is necessary to understand the code you wanted reviewed. Some things to include:
- Any classes that your code uses that you wrote (you do not need to include the code for external imports of code written by others).
- Examples of how the code is used. Tests, demo, or actual code.
In regards to your specific question, people are complaining that you haven't explained what the code does. Step back for a moment. If you were asking someone to write this code, what is the specification for it? You currently have a rather generic
The test is carried out on a simple controller that returns a full list of entities from the DB or returns a specific entity by ID.
This is so generic as to be able to describe almost any code that accesses a database. More specifically, what are you doing? If you're working with games, tell us that. Some possibilities (I'm not a C# guy, so not trying to describe your actual code):
- Return all games from the database.
- Return all games from the database with property Foo (please tell us what Foo actually is, e.g. category, price range, etc.).
- Return a specific game based on an exact match to the title.
- Return a specific game based on a fuzzy match to the title.
- Return a list of games based on a fuzzy match.
- Return a specific game based on the game identifier from the database.
And what are you actually testing? That the correct game is returned? That a game is returned? That a list is returned?
In general, you should include enough explanation that we could write the code. We then use that to see if your code matches the explanation. The explanation should usually not be language specific. So even though I don't know C#, I should be able to parse the statement of the problem that the code solves.
As is, to understand what you are doing, I had to read C# code just to figure out that you are working with games. Is this for a store? A review site? Something else? I don't know. But I should.
On Stack Overflow, it is encouraged to make questions generic so that they'll be reusable. And similar questions get closed as duplicates. We don't do that. We ask you to be as specific as possible. You can even post the identical problem statement with revised code additional times (the iterative review process) if you feel that you want feedback on the revisions that you made based on answers to your first question.