Framework-Agnostic Query Adaptation: Ensuring SQL Compatibility Across .NET Database Frameworks
Milan Abrahám · Digital Repository (National Repository of Grey Literature) · 2025
Modern software systems face rapidly evolving requirements that impact both their underlying data and executed queries. While automatic adaptation on the database side has received considerable attention, there is a significant gap regarding how such changes affect application code, particularly in the context of Object-Relational Mapping (ORM). In this thesis, we introduce a novel approach for the translation of ORM configu- rations and queries. By analysing seven .NET ORM frameworks, we propose a unified representation and a set of algorithms enabling automatic translation. Building on this foundation, we present an optimization advisor module. This advisor systematically translates and executes queries across all target frameworks, collecting empirical perfor- mance data. Using Integer Linear Programming techniques, it recommends the optimal combination of frameworks for a given set of queries and constraints.