C#C
C#2y ago
FraznoFire

best way to handle multiple codebases interacting with same db?

Hi everyone, I’m working on a “bank” project that has two codebases, the first is an ASP.NET based API that the website front end interacts with, and the second is an Azure Functions based service worker that is used to run scheduled tasks, such as interest payments. Both use EF Core to talk to the DB

Essentially, I have the API ready to go, but it has several data validation checks when interacting with the database, such as source account has enough currency to cover the transaction etc.

I’m not sure what would be the most scalable way to replicate that code to the Azure Function, so that if I make any changes to the model used or something, how can I make sure that the function’s code stays in sync without manually copying it across?

Here’s a basic diagram of the app if that helps clear it up:
IMG_0759.png
Was this page helpful?