Thonk
Docker and .NET migrations
@Becquerel First of all, thank you very much for your quick response.
If I understand correctly, I am not required to create a separate database for each service. However, services should avoid accessing the same table in the database. You mentioned schemas, but I must admit I don’t know much about them. Could you provide an example or a link to help me understand this better?
As for my approach, I was planning to have each service define its own entities and work only with the data it needs and has defined (using EF migrations). If a service requires additional data, it should call another service.
Regarding the second point, I understand a bit better now: I can generate an SQL script from the EF migration to insert tables directly into the database (without going through the service inside the container?). My issue is that I want to be able to test my container locally with my services as if I were in production (so without relying on a CI/CD pipeline with Git).
6 replies