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

Shallow Property Model Binding #3

Closed rauhryan closed 11 years ago

rauhryan commented 11 years ago

It would rad if you supported model binding to shallow auto properties on a POCO object

public class WebsiteSettings 
{
    public string Herp { get; set;}
    public string Derp { get; set; }
}
<appSettings>
    <add key="Herp" value="herp" />
    <add key="WebsiteSettingsDerp" value="derp" />
</appSettings>

WebsiteSettings settings = Configuration.Bind<WebsiteSettings>();
Tazer commented 11 years ago

+1 for that!

ChrisMissal commented 11 years ago

I'm assuming WebsiteSettingsDerp would be attempted for binding as a higher priority than Derp, fair?

rauhryan commented 11 years ago

Sweet action!

ChrisMissal commented 11 years ago

:sparkles: On Feb 23, 2013 5:02 PM, "Ryan Rauh" notifications@github.com wrote:

Sweet action!

— Reply to this email directly or view it on GitHubhttps://github.com/ChrisMissal/Formo/issues/3#issuecomment-13999850.