public override Customer Save(Customer instance) { if (instance.Id != 0) { throw new ApplicationException("Entity instance cannot be saved, the Id field was not cero"); } GetNewId(instance); RepositoryMap.Add(instance.Id, instance); return(instance); }
public override void Remove(Customer instance) { RepositoryMap.Remove(instance.Id); }