The equivalent in F#, and with asp.net minimal API that you are using, would be to put this before let app = ...
:
builder.Services.AddElmah<SqlErrorLog>(fun options -> options.ConnectionString <- "Server=localhost;Database=ELMAH;Integrated Security=True;")