private void SaveContext(ProductionDomainContext _contextToSave) { //load Simulation Results to Main data Context. var simState = new DB.Models.Simulation { CreationDate = DateTime.Now, SimulationDbState = Newtonsoft.Json.JsonConvert.SerializeObject(_contextToSave.SaveSimulationState()), SimulationType = SimulationType.Central, }; }