I am getting this error in Entity Framework while inserting. An error occurred while updating the entries.
Here is my code:
public static void NewCustomer(string name,string address,string cnicno, string cellno,int productpurchasedid,string comments )
{
using (CRMEntities context = new CRMEntities())
{
Customer cs = new Customer() { name=name , address=address , cnicno = cnicno, cellno =cellno, productpurchasedid = productpurchasedid, comments=comments };
context.Customers.Add(cs);
context.SaveChanges(); //Error point
}
}