ChrisMissal / Formo

Formo allows you to use your configuration file as a dynamic object. Turn your web.config or application settings into a rich, dynamic object.
http://chrismissal.com/Formo/
MIT License
259 stars 33 forks source link

Binding connection strings #28

Closed henninga closed 10 years ago

henninga commented 10 years ago

Is it possible, when binding to a class, to bind connection strings or does it only support appstring and config section?

ChrisMissal commented 10 years ago

Right now that's not possible with Formo but I'm not opposed to making it possible. I could see it working like this:

public class ProductSettings
{
  public string SettingOne { get; set; }
  public int SettingTwo { get; set; }
  public ConnectionString ConnName { get; set; }
}

Thoughts?

henninga commented 10 years ago

That is something I can use. Would it be difficult to get the string value instead of ConnectionString?

ChrisMissal commented 10 years ago

I don't think it would be difficult, but the ConnectionString object has more values and I'd rather not limit it to just the string value.

henninga commented 10 years ago

Sure, I can see that. Works well for me :)

ChrisMissal commented 10 years ago

Closed by #30, thanks!