I have this C# Code:
using (ContractorsEntities context = new ContractorsEntities(Properties.Settings.Default.Connection))
{
warningBindingSource.DataSource = context.Warnings.ToList();
educationLevelBindingSource.DataSource = context.EducationLevels.ToList();
penaltyBindingSource.DataSource = context.Penalties.ToList();
}
Everything is working fine without any problems but if I add new rows to GridView or updated some rows for example, how i can submit data - new rows - to Database?
I know we should call context.SaveChanges();
but it will not work.