示例#1
0
        /// <summary>
        /// Delete Ntr Type
        /// </summary>
        public void DeleteNtrType(long ntrTypeId)
        {
            NrtType dbversion = nrtTypeRepository.Find(ntrTypeId);

            CheckNrtTypeAssociations(ntrTypeId);
            if (dbversion == null)
            {
                throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture,
                                                                  "Nrt Type with Id {0} not found!", ntrTypeId));
            }
            nrtTypeRepository.Delete(dbversion);
            nrtTypeRepository.SaveChanges();
        }