Replies: 1 comment
-
I think this is a concern for the Repository layer. A read-only or append-only repository can be enforced via an While we could create a dedicated If you have performance problems, an alternative could be views, materialized views, or even stored procedures for read-only queries. If you use materialized views, there will be no locking issues on the main table, and scaling the database becomes straightforward. Read replicas make the most sense for geo-replication, but that also introduces cross-region latency, consistency challenges, and data regulation concerns—not to mention the need for dedicated read-only services. From my experience, SQL Server (especially the Hyperscale Tier) can handle massive workloads when used correctly, with a focus on optimizations like indexing, query tuning, etc. Also, be mindful of how Entity Framework generates queries to avoid inefficient joins. I recommend avoiding navigational properties (like PS: Everything is already |
Beta Was this translation helpful? Give feedback.
-
Any thoughts / plans to provide a
ReadWrite
db context for Commands and a pureRead
db context forQueries
?(Read would be optimized e.g. using replicas/named replicas,
AsNoTracking
,ApplicationIntent=ReadOnly
etc.)Beta Was this translation helpful? Give feedback.
All reactions