Пример #1
0
 public void Insert(Person person)
 {
     using (var db = _dbFactory.OpenDbConnection())
     {
         db.Insert(person);
     }
 }
Пример #2
0
        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);
        }