-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
31 migrate from mongodb to mysqlmariadb #42
Conversation
…and included a proper AppDbContext
…g traditional layered architecture, because EF will be directly used by the services
…of repository pattern
…ntity Framework integration into the services
…f the integration of Entity Framework into the service
…ration of Entity Framework into the services
…y pattern was removed
…omparers so the lists can be parsed by entity framework
…n conversion can cause issues
…g enumeration issues with entity framework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Nothing big to complain, I guess! There are a few more topics, like request cancellation using CancellationToken
, but they are not really specific to the db change, since nothing in the backend currently really does that, so I don't think they have to be done right now.
I migrated the whole project, including the CLI toolbox, from the mongoDB driver to Entity Framework with MySQL/MariaDB.
During this migration, the repository pattern was removed, as Entity Framework already implements the repository pattern with the DBSets.
I also fixed up existing unit tests to work with Entity Framework.
This meant pretty substantial changes to the project, including changing some of the entities properties to actual relations, as we are now working with a relational SQL database instead of No-SQL.
I tested the core functionality of the API (creating, updating, querying and deleting different records) through Swagger and the CLI toolbox and fixed the issues I found.
There are some things I could not test properly, like the Telegram integration for example. As the changes in this issue are already pretty extensive, and as we need Entity Framework to work on some of the other open issues, I suggest that we merge these changes into main and go on from there by fixing issues we find and implementing further performance optimizations for Entity Framework in separate issues. A lot of the aspects I did not fully test yet are planned to be reworked or scrapped, like the CLI toolbox for example.