-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Milestone
Description
What problem are you trying to solve?
When working with Azure Cosmos DB, you might interact with cosmos db directly (outside of EF) but still want to deserialize the document to an entity.
For example, when using the change feed processor:
var client = context.Database.GetCosmosClient();
var container = client.GetContainer(
context.Database.GetCosmosDatabaseId(),
context.Model.GetEntityTypes().Single().GetContainer());
var processor = container.GetChangeFeedProcessorBuilder("processor", async (IReadOnlyCollection<JObject> changes, CancellationToken ctx) =>
{
foreach (var change in changes)
{
// Deserialize to entity?
}
}).WithInMemoryLeaseContainer().Build();
Describe the solution you'd like
Some way to deserialize documents to entity types