cmeeren / Facil

Facil generates F# data access source code from SQL queries and stored procedures. Optimized for developer happiness.
MIT License
140 stars 7 forks source link

facil and teams with more than one developer #34

Closed costa100 closed 2 years ago

costa100 commented 2 years ago

Hello,

What is the recommended way to configure facil when more than one developer works on a project, and developers use individual development databases?

Thanks

costa100 commented 2 years ago

I ended up placing the connection strings in the appsettings.development.json file. This file is not committed in git. One of the other things we need to do when we get a new version updated by another developer, is to apply his database updates.

Any other thoughts or advice, perhaps there is a better way?

Also, please improve this paragraph: https://github.com/cmeeren/Facil/blob/8de62414fc6c0ed46d8631542135e980bdeec157/facil_reference.yaml#L23 I do not understand the behaviour, what it means exactly that the prefix will be removed from the environment variable. Why does it need to be removed? An example would help a lot.

Thanks!

cmeeren commented 2 years ago

I believe user secrets are the standard way to solve this.

appsettings.development.json should, as I understand it, be committed and thus not contain developer-specific stuff.

You can read more about configuration here. This includes prefixed environment variables. Note that the prefix can be empty.

cmeeren commented 2 years ago

In the reference YAML file, in the description for the configs property, I link to two official articles that explain all the configuration sources. So I believe this is explained well enough. Let me know if you still disagree.

https://github.com/cmeeren/Facil/blob/8de62414fc6c0ed46d8631542135e980bdeec157/facil_reference.yaml#L7-L26

costa100 commented 2 years ago

It's all good - like you said, it's in the MS documentation. Thank you!