Its quite weird, i was trying to insert a record in to my db using LINQ but ,my intellisense is not showing InsertonSubmit property,so am using the below code to insert a record but am just curios to find out what is going on with my visual studio.
public CreateSapCostCentreList(string Code, string Name,string Manager)
{
var db = new SAPLookUpEntities();
SAPCostCentre SapLookUp = new SAPCostCentre();
SapLookUp.CostCentreCode = Code;
SapLookUp.CostCentreName = Name;
SapLookUp.CostCentreManager = Manager;
db.SAPCostCentres.AddObject(SapLookUp);
db.SaveChanges();
Add(new SchedSAPEntities.SapCostCentreEntities.CreateSapCostCentre());
}
From
db.SaveChanges();it appears you are using LINQ to entities.Table<TEntity>.InsertOnSubmitis available with LINQ to SQL