Пример #1
0
 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);
 }
Пример #2
0
 public override void Remove(Customer instance)
 {
     RepositoryMap.Remove(instance.Id);
 }