Ejemplo n.º 1
0
        private void buttonload_Click(object sender, EventArgs e)
        {
            Human zhansan = new Human();

            zhansan.Age = 19;
            HumanCurdRepository database = new HumanCurdRepository();

            database.Add(zhansan);
            this.dataGridView.DataSource = database.GetAll();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //Human zhansan = new Human();
            //zhansan.Age = 18;
            //Human lisi = new Human();
            //lisi.Age = 19;
            //Human wangwu = new Human();
            //Human zhaoliu = new Human();
            Human zhansan = new Human();

            zhansan.Age = 19;
            HumanCurdRepository database = new HumanCurdRepository();

            database.Add(zhansan);
            Console.WriteLine(JsonConvert.SerializeObject(database.GetAll()));
        }