Entity Framework and MongoDb

前端 未结 6 1125
孤城傲影
孤城傲影 2021-02-01 12:18

Is it possible that Entity Framework supports MongoDb database? Maybe somebody will write a EF MongoDb Provider?

6条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-01 12:38

    I'm a big fan of entity framework, so when I first tried out mongoDb I've created a library called "MongoDB.Dynamic" that has an approach next to EF Code First. MongoDB has no relations between collections physically, but you can simulate it. MongoDB.Dynamic has a feature known as Eager Loading that you can configure relationships between collections and load related documents automatically if an entity have the conventioned structure. You can try and read some documentation at MongoDB.Dynamic

提交回复
热议问题