As far as I know, you cannot define a virtual participant in a record - this makes sense because you also cannot inherit a record, so why do you need virtual members.
But I understand why this is necessary for the Entity Framework. It might make sense to have something like the CliVirtual attribute, akin to CliMutable (especially if this happens often). Feel free to suggest this on the F # uservoice page !
So, I think your best option is to use a regular class with virtual automatically implemented properties (which looks much uglier):
type A() = abstract member Id: int with get, set default val Id = 123 with get, set
Or maybe see if some other SQL provider for F # can do the same thing more beautifully!
source share