// Intending to use this one when IOC is wired up public ProcessLogViewModel(IEdhLogDataContext dc) { EdhLogDataContext = dc; RetrieveByProcessNameCommand = new DelegateCommand <string>(new Action <string>(i => { LogMessages = new ObservableCollection <ProcessLog>(EdhLogDataContext.NameStartsWithQuery(i)); OnPropertyChanged("LogMessages"); })); }
public DatabaseFixture() { if (UseFakeContext) { EdhLogDataContext = new EdhLogFakeDataContext(); } else { var databaseConfigFileName = "EdhLogViewer.database.config"; var installationDirectory = @"c:\Dev\EdhLogViewer\DataAccess"; var databaseConfig = System.IO.Path.Combine(installationDirectory, databaseConfigFileName); var mappingSource = XmlMappingSource.FromUrl(databaseConfig); EdhLogDataContext = new EdhLogDataContext("Data Source=EDHDBSIT01,65000;Initial Catalog=ODS_SIT01;Integrated Security=True", mappingSource, false, 30); } }