public async Task <DataJSON> PostAsync([FromBody] DataJSON value) { ApplicationUser user = await _userManager.GetUserAsync(HttpContext.User); var run = new RecycleBin.RunModel { RunName = value.runName, User = user, Time = DateTime.Now, NetType = value.network.type, Network = null, NetNodes = value.network.nodes, DoContact = value.do_contact, Target = value.targets, DrugTarget = value.drug_targets, AlgorithmType = value.algorithm.type, AlgorithmParams = value.algorithm.param, Progress = null, BestResult = null, IsCompleted = false }; _context.Add(run); _context.SaveChanges(); return(value); }
private void Awake() { StreamReader reader = new StreamReader(m_path, true); m_jsonData = reader.ReadToEnd(); reader.Close(); m_gameData = JsonUtility.FromJson <DataJSON>(m_jsonData); }