コード例 #1
0
 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();
     }
 }
コード例 #2
0
ファイル: SolverData.cs プロジェクト: mohsenboojari/offwind
 public static SolverData GetDefaultModel()
 {
     var sd = new SolverData();
     sd.ControlDict.endTime = 15;
     return sd;
 }