コード例 #1
0
        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="id">Source Journal Name</param>
        /// <returns>SourceJournalProfile</returns>
        public T Delete(string id)
        {
            _businessEntity = CreateBusinessEntities();
            _businessEntity.SetValue(SourceJournalProfile.Fields.SourceJournalName, id);

            if (_businessEntity.Read(false))
            {
                _businessEntity.Delete();
            }
            else
            {
                throw ExceptionHelper.RowNotFoundException(CommonResx.DeleteFailedNoRecordMessage);
            }

            _businessEntity.Cancel();

            var mapper = new SourceJournalProfileMapper <T>(_context);

            return(mapper.Map(_businessEntity));
        }