📅  最后修改于: 2022-03-11 14:48:41.083000             🧑  作者: Mango
var id = Guid.NewGuid();
// insert
using (var db = new EfContext("name=EfSample"))
{
var customers = db.Set();
customers.Add( new Customer { CustomerId = id, Name = "John Doe" } );
db.SaveChanges();
}