public IActionResult Get() { var two = new TestTwo() { Id = Guid.NewGuid(), Test = "some text 2" }; var one = new TestOne() { Id = Guid.NewGuid(), Number = 2, Condition = true, Text = "some text 1", Elems = new List <TestTwo>() { two } }; _context.TestOnes.Add(one); _context.SaveChanges(); return(Ok("Successfully inserted data to db")); }
public void OnClickBtn() { GameObject go = Instantiate(Resources.Load("Prefabs/TestTwo") as GameObject); TestTwo tt = go.GetComponent <TestTwo> (); if (tt == null) { tt = go.AddComponent <TestTwo> (); } Close(); }
public void TestOneRowTwoColumns() { var expected = Clean(@" o-------o------o | One | Two | o-------o------o | Three | Four | o-------o------o "); var test = new TestTwo(); var actual = Formatter.Format(new[] { test }); Debug.WriteLine(actual); Assert.AreEqual(expected, actual); }
private void Awake() { instance = this; }