미분류

Introducing the Couchbase .NET Client Library 1.0

2 분 읽기

What’s in a Name?

With the release of Couchbase Server 1.8, both the server and client libraries are getting a number of bug fixes.  But the change that will mean the most to long time users is the new name.  Membase Server is now Couchbase Server and the Membase .NET Client Library is now the Couchbase .NET Client Library.  This refactoring isn’t like renaming your AccountManager class to AccountService, it goes beyond that.

Getting the Client

There are a couple of ways to get the Couchbase .NET Client Library, or simply “the client.”  The easiest way, is use 누오겟, the .NET package manager for Visual Studio.    You can get the Couchbase Nuget package by opening the Package Manager Console under View -> Other Windows and typing:

InstallPackage CouchbaseNetClient

A second option is to download a zip file with the assembly and dependencies.  You can also grab the latest source from 깃허브. See the notes readme.mdown to build from the source.

Hello, Couchbase!

Checkout the client’s home page for a walkthrough on how to get started with the client.  The API documentation provides sample code for the primary methods you’ll use when working with the client.  The snippets below give you the basics of the client.

//standard app.config settings may also be used
var config = 새로운 CouchbaseClientConfiguration { 양동이 = “default” };
설정.Urls.Add(새로운 Uri(“https://127.0.0.1:8091/pools/default”));var beer = 새로운 Beer { 이름 = “Atlantic Amber”, Brewery = “New England Brewing Co.” }
var client = 새로운 CouchbaseClient(설정);
client.Store(StoreMode.Add, “beer_12345”, beer);

var savedBeer = client.Get<Beer<(“beer_12345”);

Breaking Changes

With the product name change comes a new name for the client.  This update means that your code that used to look like:

var client = 새로운 MembaseClient();

now looks like:

var client = 새로운 CouchbaseClient();

The config section has changed as well.

Looking Forward

Couchbase Server 1.8 and the .NET Client Library 1.0 are only a few hours old (well, they’ve only been released for a few hours), but we’re already thinking about Couchbase Server 2.0 and the new client libraries.   So keep an eye on this blog for the latest samples and information.

이 기사 공유하기

작가

John Zablocki is a NET. SDK Developer at Couchbase. John is also the organizer of Beantown ALT.NET and a former adjunct at Fairfield University. You can also check out the book on Amazon named “Couchbase Essentials” which explains how to install and configure Couchbase Server.

2개의 응답

  1. Jeffrymorris 아바타
    Jeffrymorris

    What we (API consumers) need is a client API that allows for querying against the elements and attributes of  the design doc. Key/Value lookups only get you so far and require hacky solutions to problems like lists of sub elements.

  2. […] his blog, John Zablocki introduces the new .NET SDK, while Rags Srinivas covers the updates in both the Java and Ruby SDKs.  Our own Jan Lehnardt also […]

댓글 남기기

카우치베이스 카펠라를 시작할 준비가 되셨나요?

개발 시작하기

NoSQL을 탐색하고, 리소스를 찾아보고, 튜토리얼을 시작하려면 개발자 포털을 확인하세요.

카펠라 프리 사용하기

단 몇 번의 클릭으로 카우치베이스(Couchbase)를 직접 체험해 보세요. Capella DBaaS는 시작하기 가장 쉽고 빠른 방법입니다.

연락해

Couchbase 제품군에 대해 더 알고 싶으신가요? 저희가 도와드리겠습니다.