示例#1
0
        public static void InsertDocuments <T>(this CqlDbContext context, T[] documents)
        {
            var timestamp = DateTimeOffset.UtcNow;
            var table     = context.GetTable <T>();

            foreach (var document in documents)
            {
                table.Insert(document).SetTimestamp(timestamp).Execute();
            }
        }
示例#2
0
 public static void InsertDocument <T>(this CqlDbContext cassandraManager, T document)
 {
     cassandraManager.GetTable <T>().Insert(document).SetTimestamp(DateTimeOffset.UtcNow).Execute();
 }