Hi again,
in your
ADDFunction
, you are adding
CurrentCustomer
to your collection. I guess it's a typo and it should be
customerToAddObject
object you are adding to your database.
Also, you may want to create an object in the time of adding, not in your constructor.
private void ADDFunction(object obj)
{
customerToAddObject = new Custmor();
using (Test1Entities context = new Test1Entities())
{
context.Custmor.Add(customerToAddObject);
context.SaveChanges();
}
_loadDataBinding.Add(customerToAddObject);
}