In Entity Framework we can define a Primary Key on more than one columns.
something like this
public class MyEntity
{
[Key, Column(Order=0)]
public int MyFirstKeyProperty { get; set; }
[Key, Column(Order=1)]
public int MySecondKeyProperty { get; set; }
}
Is there any way to achieve such behavior in mongoDb ?