Update: Configuration Framework +CallerMemberName

Simplified creation of configuration modules; Scope is obtained from
abstract, Property names become keys (via CallerMemberName); Simple
generic Get/Set methods are used; Helpers for Obsfucation and Json are
available.
This commit is contained in:
Gary Sharp
2013-05-03 20:48:15 +10:00
parent d19ad7d0dc
commit 8533ec2fe0
23 changed files with 545 additions and 684 deletions
+3 -3
View File
@@ -10,11 +10,11 @@ namespace Disco.Data.Repository
{
public class DiscoDataContext : DbContext
{
private Lazy<Configuration.ConfigurationContext> _Configuration;
private Lazy<Configuration.SystemConfiguration> _Configuration;
public DiscoDataContext()
{
this._Configuration = new Lazy<Configuration.ConfigurationContext>(() => new Configuration.ConfigurationContext(this));
this._Configuration = new Lazy<Configuration.SystemConfiguration>(() => new Configuration.SystemConfiguration(this));
}
public virtual DbSet<ConfigurationItem> ConfigurationItems { get; set; }
@@ -47,7 +47,7 @@ namespace Disco.Data.Repository
public virtual DbSet<JobMetaNonWarranty> JobMetaNonWarranties { get; set; }
public virtual DbSet<JobMetaInsurance> JobMetaInsurances { get; set; }
public Configuration.ConfigurationContext DiscoConfiguration
public Configuration.SystemConfiguration DiscoConfiguration
{
get
{