The following method save an object in database but all things is working fine when control moves" db.savechanges();" it through an exception
any one have an idea why error comes?
I am very Confuse Since Morning another method which saves another object will working Fine :
private CouerierTrackingSystemEntities db = new CouerierTrackingSystemEntities();
public bool saveEmployee()
{
string dmoname = DropDownList1.SelectedItem.Text;
string statname = DropDownList2.SelectedItem.Text;
Employee eobj = new Employee();
try
{
if (dmoname != "SELECT DMO")
{
DMO tdmo = db.DMOes.Single(d => d.Dmo_Name == dmoname);
eobj.Dmo_Id = tdmo.Dmo_Id;
eo ...
Go to the complete details ...