public void Insert(Person person) { using (var db = _dbFactory.OpenDbConnection()) { db.Insert(person); } }
static void Main(string[] args) { var connectionString = ConfigurationManager.ConnectionStrings["SimpleDataSpike"]; var repo = new Repo(connectionString.ConnectionString); var person = new Person { Id = Guid.NewGuid(), FirstName = "Han", LastName = "Solo", LastUpdated = DateTime.Now, User = "******" }; repo.Insert(person); }