Exemple #1
0
        private void btn_InsertContent_Click(object sender, EventArgs e)
        {
            List <MsSqlDbExplorer.ContentData> data = new List <MsSqlDbExplorer.ContentData>();

            for (int i = 0; i < 10; i++) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            {
                MsSqlDbExplorer.ContentData cd = new MsSqlDbExplorer.ContentData()
                {
                    amazon_id         = Guid.NewGuid(),
                    location_id       = 12345,
                    partner_id        = 32000,
                    order_id          = Guid.NewGuid(),
                    shooting_datetime = DateTime.Now.AddMinutes(-10),
                    ready_datetime    = DateTime.Now,
                    expiration_date   = DateTime.Now.AddDays(10),
                    locked            = false,
                    x = 0.1F,
                    y = 0.2F,
                    w = 0.3F,
                    h = 0.4F,
                    a = 12,
                    //width = 6000, heigth = 4000, size = 2000000,
                    face_cloud_id        = Guid.NewGuid().ToString(),
                    thumbnail_cloud_id   = Guid.NewGuid().ToString(),
                    photo_cloud_id       = Guid.NewGuid().ToString(),
                    face_local_path      = "face_local_path_face_local_path_face_local_path_face_local_path_face_local_path",
                    thumbnail_local_path = "thumbnail_local_path_thumbnail_local_path_thumbnail_local_path_thumbnail_local_path_thumbnail_local_path",
                    photo_local_path     = "photo_local_path_photo_local_path_photo_local_path_photo_local_path_photo_local_path",
                };
                data.Add(cd);
            }

            MsSqlDbExplorer dbExplorer = new MsSqlDbExplorer();

            DateTime dt1  = DateTime.Now;
            var      lost = dbExplorer.InsertIntoContent(data);
            DateTime dt2  = DateTime.Now;
        }