protected void SetSolverData(SolverData model) { var serializer = new XmlSerializer(typeof(SolverData)); using (var writer = new StringWriter()) { var dCase = ctx.DCases.First(c => c.Owner == User.Identity.Name && c.Name == StandardCases.CfdCase); serializer.Serialize(writer, model); dCase.Model = writer.ToString(); writer.Close(); ctx.SaveChanges(); } }
public static SolverData GetDefaultModel() { var sd = new SolverData(); sd.ControlDict.endTime = 15; return sd; }