How to pass ObjectId from MongoDB in MVC.net

后端 未结 5 470
野的像风
野的像风 2020-12-06 11:55

I\'m starting a new project with Mongo, NoRM and MVC .Net.

Before I was using FluentNHibernate so my IDs were integer, now my IDs are ObjectId. So when I have an Edi

5条回答
  •  误落风尘
    2020-12-06 12:35

    I am not familiar with the ObjectId type but you could write a custom model binder that will take care of converting the id route constraint to an instance of ObjectId.

提交回复
热议问题