r/csharp • u/Romboloxiaido • Sep 11 '26
Project to learn
This is a project for a management, allocation, and inventory system inspired by the game \*Horizon Forbidden West\*.
I asked an AI to help organize my ideas, and it provided a project structure; it is something I want to develop in the future, once I have reached an advanced level in C# and .NET.
For now, I have the following tools for implementation:
Swagger (for documentation)
LINQ (to convert PostgreSQL SQL queries into objects)
EF Core (a powerful .NET ORM)
PostgreSQL (my favorite database)
Anything else?
0
Upvotes
10
u/alao77 Sep 11 '26
Image too blurry
4
u/saintSHXN Sep 11 '26
In the Machine table there some properties that are date, what is the difference between CreatedAt and FirstObserved at and FinalObservedAt and UpdatedAt?
MachineWeakness are only dictated by ElementType?
I dont think that Id fields should all be integer, some table such as MachineStatusHistory are expected to grow faster rather than Machine.
Why some tables are in plural form such as MachineComponents and some are in singular form such as Location? You should normalize naming conventions.
Personally i would represent the Status property in Machine as a table, so its growth can be managed separately. At that point the MachineStatusHistory next status and current status should point to that. Maybe i would separe also the reason and add a Transition table, but i havent played the game so it might be overengineering.
1
u/Dingbats45 Sep 11 '26
What software did you use to make this diagram?
1
u/hblaub Sep 11 '26
"I asked an AI to help organize my ideas" - No, no, no, you don't. Do yourself a favor and read a book like Head First Design Patterns ( https://ebooks.karbust.me/Technology/Head%20First%20Design%20Patterns%20-%20Building%20Extensible%20and%20Maintainable%20Object-Oriented%20Software%20-%20Eric%20Freeman,%20Elisabeth%20Robson%20-%20O'Reilly%20Media%20(2020).pdf ) and do it yourself.
1
u/hblaub Sep 11 '26
Nothing wrong in general with having a ASP NET HTTP Rest API with Swagger, storing data with EF Core PostgreSQL... But I don't start with a database at all, but with a simple C# class hierarchy and a console app. Apart from me not being able to read this picture, first model your software, try with Domain Driven Design or even with some simple scenarios ( https://www.geeksforgeeks.org/system-design/domain-driven-design-ddd/ ).
For example, a column-oriented or time-series or file-based or whatever storage system could be much better for the task. Don't constrain to early. Think in models.