Esempio n. 1
0
        public Telephone Add(Telephone entity)
        {
            if (entity.Id > 0) return entity;

            context.Telephone.AddObject(entity);

            try
            {
                context.SaveChanges();
            }
            catch (OptimisticConcurrencyException e)
            {
                //An optimistic concurrency violation has occurred in the data source.
                throw new ConcurrencyException(e.Message);
            }

            return entity;
        }
Esempio n. 2
0
 public Telephone Update(Telephone entity)
 {
     return entity;
 }
Esempio n. 3
0
 public void Delete(Telephone entity)
 {
     context.DeleteObject(entity);
 }