Niranjan Poddar

Niranjan Poddar

  • 1.1k
  • 648
  • 95.8k

Entity Framework

Dec 31 2014 2:04 AM
Dear all,
 
 
Please help me,
when i am trying to insert records into table, that time invoked an error- like---
An error occurred while updating the entries. See the inner exception for details.
 
how to solve this problem in entity framework...
 
my code-
 
protected void btnSave_Click ( object sender, EventArgs e )
{
CONTACT con = new CONTACT ( );
con.ID = 0;
con.FNAME = txtFname.Text.ToString ( );
con.LNAME = txtLname.Text.ToString ( );
con.PHONE = txtContact.Text.ToString ( );

TEST_DBEntities dd = new TEST_DBEntities ( );
dd.CONTACTs.Add ( con );
dd.SaveChanges ( );
 
 
Regards
Niranjan Poddar

Answers (1)