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(); } }
public static void InsertDocument <T>(this CqlDbContext cassandraManager, T document) { cassandraManager.GetTable <T>().Insert(document).SetTimestamp(DateTimeOffset.UtcNow).Execute(); }