public static void Initialize() { DataAccessorConfiguration config = new DataAccessorConfiguration(); // TODO: 初始化为适当的值 config.MappingsAssemblies = new List <System.Reflection.Assembly>(); config.MappingsAssemblies.Add(System.Reflection.Assembly.GetExecutingAssembly()); config.MappingsAssemblies.AddRange(NS.Framework.Config.PlatformConfig.ServerConfig.DataBaseSetting.GetMappingAssemblys); var configFileName = string.Format("{0}-{1}", "car", NS.Framework.Config.PlatformConfig.ServerConfig.DataBaseSetting.ConfigFile); //var configFileName = config.ConfigFile; if (NS.Framework.Config.PlatformConfig.ServerConfig.ConfigFilePath.EndsWith("bin")) { config.ConfigFile = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "bin", configFileName); } else { config.ConfigFile = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, configFileName); } _config = config; }
public static void Initialize(DataAccessorConfiguration config) { _config = config; }