We have developed our own SQL database connection utility within our .NET application, however we want it to behave differently if the SQL database that it has connected to is a PaaS database, such as Amazon RDS or Azure SQL. The reason being, we want to disable the ability to backup and restore a database via our utility in these instances.
What would be the best, fool-proof way to detect this?
Some other posts recommend using SELECT SERVERPROPERTY ('edition'), however it works OK for Azure SQL, but just returns "Express Edition (64-bit)" for an Amazon RDS database.