Closed jkone27 closed 4 years ago
We're not planning to get a direct dependency on any type provider in Saturn. But please, feel free to continue using your method if it fits your projects - it's not something I want to push on all users of Saturn.
Thanks for the suggestion!
A pity, i think type providers should be a first choice for F# development, since they make it uncomparable to other languages as a development advantage. Every time data changes, developers spend time adjusting and trimming data contracts, type providers would be just a huge time saver for this, especially in enterprise environment
I personally love this, if possible use FSharp.Data JsonProvider for appsettings.env.json files for aspnetcore, that gives a big advantage of not having to type new stuff every time a setting is added, also useful in industry and quite common scenario (which already show advantages over e.g. C#)
Then registering a single AppSettings type as singleton can provide many benefits for the app, not having to adjust every time a new setting is changed
I Still haven't figured out how to use it as option, since JSonProvider provided types are erased, cannot be used for doing
example of some code i did (probably there is a better way, but this for me is already quite nice as results):
https://github.com/jkone27/FsharpWebApi/blob/master/FSharp/Startup.fs