首页 新闻 赞助 找找看

C#连接cassandra数据库,如何生成C#的链接cassandra的dll

0
悬赏园豆:20 [待解决问题]

最近在看Nosql相关方面的东西,想用C#连接cassandra 数据库,根据资料连接cassandra数据库之前必须像连接关系型数据库那样引入 cassandra  的dll文件,这里只好像介绍了通过编cassandra.thrift 文件就可以,求高人教教怎么编译cassandra.thrift文件。

hanxuefeng的主页 hanxuefeng | 初学一级 | 园豆:86
提问于:2010-10-28 19:19
< >
分享
所有回答(1)
0

1. 去http://thrift.apache.org/下载一个最新版本的Thrift,解压缩并取出

thrift\thrift\lib\csharp\src Thrift.sln,build后得到一个Thrift.dll。

2. 去http://thrift.apache.org/ 下载一个最新版本的Thrift.exe

到cassandra的安装目录,找到interface目录, CMD 中执行 thrift -gen csharp cassandra.thrift  命令, 生成: gen-csharp folder

3. 建一个C#工程, 把gen-csharp folder下面的code加进去,并且添加引用Thrift.dll。

contra_plus | 园豆:202 (菜鸟二级) | 2012-09-07 16:55
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册