couchbaselabs / couchbaselabs/Linq2Couchbase

Metadata Semantics Too Verbose

Open
#262 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
98
Forks
50
PR merge metrics
No merged PRs in 30d

Description

The semantics for retrieving metadata seem rather verbose. In order to populate a Document I have I have to call the Meta function several times.

```c#
db.Query().Select(s => new Document
{
Id = N1QlFunctions.Meta(s).Id,
Cas = N1QlFunctions.Meta(s).Cas,
Content = s
}).First()
```

It really seems like there should be a way to just directly map the metadata to a Document or even better to properties on the POCO object. Something like the [BsonIdAttribute](https://mongodb.github.io/mongo-csharp-driver/2.7/apidocs/html/T_MongoDB_Bson_Serialization_Attributes_BsonIdAttribute.htm) in MongoDb.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.