Пример #1
0
        public void Delete <T>(T entity)
            where T : Entity
        {
            SOAPLikeEntityAPI <T> api = new SOAPLikeEntityAPI <T>(CurrentConfiguration);

            if (entity.ID != null)
            {
                api.DeleteById(entity.ID);
            }
            else
            {
                api.DeleteById(Get(entity).ID);
            }
        }
        /// <summary>
        /// Deletes the record by its session identifier.
        /// </summary>
        /// <exception cref="ApiException">Thrown when fails to make API call</exception>
        /// <param name="id">The session ID of the record.</param>
        /// <returns></returns>
        public void DeleteById <T>(Guid?id) where T : Entity
        {
            SOAPLikeEntityAPI <T> api = new SOAPLikeEntityAPI <T>(CurrentConfiguration);

            api.DeleteById(id);
        }