如何在asp.net中使用cassandra插入值c# [英] How to insert value using cassandra in asp.net c#
本文介绍了如何在asp.net中使用cassandra插入值c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在列系列中插入记录时遇到问题..
使用( var ctx = new CassandraContext(host,port,keySpace))
{
尝试
{
var employeeRecord = new CassandraEntity< List< Column>>()
.SetColumnFamily(columnFamily)
.SetKey(Convert.ToInt32(txtId.Text))
。的SetData(empRecord);
ctx.ColumnList.InsertOnSubmit(employeeRecord);
ctx.SubmitChanges();
}
}
如何解决在数据库中插入reocrd的问题.......
解决方案
看看这个
basic-crud-operation-on-cassandra [ ^ 一>
i facing problem to inserting record in Column Family..
using (var ctx = new CassandraContext(host, port, keySpace))
{
try
{
var employeeRecord = new CassandraEntity<List<Column>>()
.SetColumnFamily(columnFamily)
.SetKey(Convert.ToInt32(txtId.Text))
.SetData(empRecord);
ctx.ColumnList.InsertOnSubmit(employeeRecord);
ctx.SubmitChanges();
}
}
How to solve problem to insert reocrd in database.......
解决方案
Have a look at this one
basic-crud-operation-on-cassandra[^]
这篇关于如何在asp.net中使用cassandra插入值c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文