.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!



이 기사 공유하기

작가

Matthew D. Groves is a guy who loves to code. It doesn’t matter if it’s C#, jQuery, or PHP: he’ll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent’s pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.

댓글 남기기

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

개발 시작하기

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

카펠라 프리 사용하기

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

연락해

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