public Transaction Add(Transaction entity)
        {
            if (entity.Id > 0) return entity;

            context.Transaction.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;
        }
 public void Delete(Transaction entity)
 {
     context.DeleteObject(entity);
 }
 public Transaction Update(Transaction entity)
 {
     return entity;
 }