Hacker News new | ask | show | jobs
by bob1029 1903 days ago
We don't use SQL as the authoritative store of business state. We use C# types and all the code that goes around them for most of our heavy-lifting.

We map our C# domain model instance into a SQL database (SQLite in-memory) each time we want to execute business rule SQL against the state. These databases are ephemeral. For some interactions, we might generate 5-6 of them per user action. It is very fast to do this when your row counts are low (i.e. projections per user or per user transaction).

1 comments

What are the advantages of this over using LINQ on the in-memory object model?
You don't have to recompile the application to write new SQL queries.