.NET Core 2.1 Roadmap PT.2

Play .NET Core 2.1 Roadmap PT.2

The Discussion

  • User profile image

    About EF Core CosmoDB.

    Isn't creating a Documento Collection for each "entity" in EF the oposite of what nosql stands for.
    Also in terms of cost you pay for each collection thus imagine a 100 table SQL Azure.... converted to cosmoDb you pay a LOT for that!

  • User profile image


    Thanks for the feedback! 

    When we are done with the Cosmos DB support, we will have the ability to model documents as aggregates (a root entity type and a number of owned collections and references). 

    Inheritance will use a collection per hierarchy.

    Then, based on the current plan, you will only have to create a collection for the root hierarchy, as all the owned entity types will be embedded as part of the document.

    We believe this is the most natural way to map EF Core models to a document database, but since as you said, in Cosmos DB, collections are the billing unit, we may need to discuss doing more. 

  • User profile image

    @divega , the UnitOfWork solution is super interesting! However, I totally agree with @TheSaintr and I can say upfront that, yes, you need to discuss more!

    I made a homemade -naive- EF provider for CosmosDb and the way to avoid collection creation per type was to do something like providing the collectionId in the optionsBuilder shown in OnConfiguring, instead of only the database name. The developer should be given the possibility on where to put his entity, i.e. the client name, the database and the collection. Only this will allow them to control pricing.
    An additional thing that could be done is to do type checking which is not a default of documentdb but which you often see used by devs out there. Where is the place we can discuss there?

  • User profile image

    Nice. I have written a post on Asp .Net Core 2.1 features which you can find here: https://neelbhatt.com/2018/02/06/asp-net-core-2-1-features/

  • User profile image

    Thanks a lot - we are waiting for at least RTM to try it :)

  • User profile image

    Could we download the code ?

  • User profile image

    Yes! Could we download the source code

    Thank you

  • User profile image

    Please reupload, the video is in 360p... Can't even read the code.

  • User profile image
    Utkarsh Patel

    Could you please share working sample for entityframework with CosmosDB?

Add Your 2 Cents