示例#1
0
        protected DBTypeMapEntry Find(Type type)
        {
            //Checks if the type exists in the list
            var temp = from item in TypeList.AsEnumerable()
                       where item.Type == type && (item.DBVersion == null || item.DBVersion.Length == 0 || (HasDBVersion && item.DBVersion.Contains(DBVersion)))
                       select item;

            //Checks if we have atleast one entry
            if (temp != null && temp.FirstOrDefault() != null)
            {
                //Returns it if so
                return(temp.First());
            }
            else
            {
                throw new ApplicationException("Database Type Converter: data was used which is an unsupported Type");
            }
        }