Пример #1
0
        /// <summary>
        /// 根据映射键和类型获取映射对象
        /// </summary>
        /// <param name="mappingKey">映射的第三方键</param>
        /// <param name="type">映射类型</param>
        /// <returns>映射对象</returns>
        public Mapping GetMappingByMappingKey(string mappingKey, MappingType type)
        {
            var spec = mappingRepository.CreateSpecification()
                       .Where(o => o.MappingKey == mappingKey && o.MappingType == type);

            return(mappingRepository.FindOne(spec));
        }