12345678910111213141516171819202122232425262728293031323334 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace SqliteEFDemo
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- using (SQLiteContext context=new SQLiteContext())
- {
- Person people = new Person()
- {
- FirstName = "Hello",
- LastName = "World"
- };
- context.Persons.Add(people);
- context.SaveChanges();
- }
- }
- }
- }
|