We are currently using the following to set money column types in MS SQL Server.
entity.Property(e => e.UnitPrice).HasColumnType("smallmoney");
or
entity.Property(e => e.UnitPrice).HasColumnType("money");
What, if at all, is a more database agnostic way?
Use Decimal instead of Money. Use Decimal in c# and in Db.
See also
decimals in SQL server docu
MSDN decimal which states
Surely Decimal is the most DB agnostic way of dealing with currency. You should choose precision/scale to match the currencies and accuracy required. And i would also suggest you always track the currency itself with the amount unless you know the solution never could or will apply beyond 1 currency.
For "monetary amounts" means catering 4 extra decimal places than the currency itself describes. Since industries like high volume retailers that manage items in fractions of cents. I had to demo 4 decimal places to a retailer in a presentation. It means catering for many different currencies and as more organizations do in house treasury, if means catering for AT LEAST 5 decimals. Im planning beyond that just in case. XDR special drawing rights