I have a model class with primary key ID.
public class Order
{
public int ID { get;set }
public string Product_Name { get;set }
public string Product_Brand { get;set }
}
I want to add the product items in a database where one product can be added more than one time..
Now how can i insert same product ignoring "duplicate key insertion problem"?? Is there any way to do this??
Help please...
Insert duplicate key in entity framework
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted Jul 2, 2015, 4:06 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted Jul 2, 2015, 4:20 AM EDT
{
public int ID { get;set } // Your Order ID
public string Product_Name { get;set }
public string Product_Brand { get;set }
}