private void Initialize(string xmlFileName) { MapProvider = new MappingXmlProvider(xmlFileName); ContextFunc = () => { DbContext context = (DbContext)CreateObjectFromTypeName(MapProvider.Assembly, MapProvider.DataContextName); return(context); }; ContentService.Saving += ContentService_Saving; ContentService.Deleting += ContentService_Deleting; ContentService.Trashed += ContentService_Trashed; }
private void Initialize(string xmlFileName) { MapProvider = new MappingXmlProvider(xmlFileName); ContextFunc = () => { DbContext context = (DbContext)CreateObjectFromTypeName(MapProvider.Assembly, MapProvider.DataContextName); return context; }; ContentService.Saving += ContentService_Saving; ContentService.Deleting += ContentService_Deleting; }