.NET

Couchbase EF Core Provider 일반 가용성(GA) 출시 발표

5 분 읽기

Couchbase EF Core Provider is now generally available. This release brings the power of Entity Framework Core to Couchbase, allowing .NET developers to work with Couchbase using familiar EF Core patterns.

What is the Couchbase EF Core provider?

Entity Framework Core (EF Core) is a popular O/RM that simplifies database access for .NET applications. It allows developers to work with data using C# objects and LINQ queries instead of writing raw database queries. EF Core enables integration with various databases, providing automatic change tracking, transactions, and a familiar DbContext API. It’s a familiar interface that developers can use to save time and integrate with many frameworks and database-adjacent libraries.

Couchbase EF Core Provider enables developers to use Entity Framework Core with 카우치베이스 서버 그리고 Couchbase Capella (now available with a perpetual free tier). With this provider, you can work with Couchbase documents as if they were relational entities, using Linq queries, DbContext, and change tracking.

Getting started

To install the Couchbase EF Core Provider, add the NuGet package:

Example: using EF Core with Couchbase

Here’s a simple “shopping cart” example of how to set up and use the Couchbase EF Core Provider with a shopping cart model.

Define Your Entity Models

Create a DbContext for Couchbase

This arrangement assumes that you have created a bucket in Couchbase called Shopping, which contains a scope called Ecommerce, which contains collections Items 그리고 Carts.

Also, note that logging is optional, but it’s a good idea to turn it on to help identify any issues that may come up.

Insert and Query Data

Here’s an example of what the documents in Couchbase will look like after insertion:

What works in the GA release?

The entire functionality of EF Core is very, very large. Being able to handle every possible Linq statement, for instance, is nearly impossible, even for mature EF Core providers like SQL Server. However, this release supports many core EF Core capabilities, including:

LINQ support – Translates LINQ queries to Couchbase SQL++.
Basic CRUD operations – Insert, update, and delete work as expected.
Change tracking – Entities are tracked for efficient updates.

Also note that using Async methods is required. Couchbase’s .NET SDK is completely asynchronous. If you try to use a non-async method, you will get a runtime error along the lines of Couchbase EF Core Database Provider does not support synchronous I/O.

Known limitations

While this is a significant milestone, some features are still a work in progress, including:

Denormalization – Nesting collections inside documents (e.g., storing Items inside Cart as a single JSON document) is not yet supported.
Eager Loading.Include() statements may not work as expected.
SQL++ Function Support – Some SQL++ functions like META, RYOW, etc., are not fully implemented.
거래 – Not yet supported in this release.

Join the conversation!

We want your feedback! Help shape the future of the Couchbase EF Core Provider:

What’s next?

This release is just the beginning! We’re actively working on building out this EF Core implementation. Your feedback will help to prioritize functionality.

Try it out today and let us know what you think. Happy coding!



이 기사 공유하기

작가

매튜 D. 그로브스는 코딩을 정말 좋아하는 사람입니다. C#, jQuery, PHP 등 어떤 언어든 상관없이, 그는 무엇이든 풀 리퀘스트를 제출합니다. 그는 90년대에 부모님이 운영하던 피자 가게를 위해 QuickBASIC으로 POS(판매 시점 관리) 앱을 개발한 이래로 줄곧 전문 프로그래머로 활동해 왔습니다. 현재는 Couchbase에서 선임 제품 마케팅 매니저로 근무하고 있습니다. 여가 시간에는 가족과 함께 시간을 보내거나, 레즈(Reds) 경기를 관람하며, 개발자 커뮤니티 활동에 참여합니다. 그는 『AOP in .NET』과 『Pro Microservices in .NET』의 저자이자 Pluralsight 저자이며, Microsoft MVP이기도 합니다.

댓글 남기기

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

개발 시작하기

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

카펠라 프리 사용하기

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

연락해

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