Recently I have been playing with Entity Framework Code First and I like it a lot. There are plenty of features given and you can configure all that stuff with code. I have already written couple of post for Entity Framework Code First. Different way of mapping in EFCodeFirst Entity Framework code first and Inheritance–Table per hierarchy Entity framework code first and inheritance- Table Per Type As you EFCodeFirst generate database table based on the configuration defined in classes. Today we are going to learn about how we can create key with different configurations.