Example #1
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public override void ValidateTypeName(string storeType)
 {
     if (_disallowedMappings.Contains(storeType))
     {
         throw new ArgumentException(JetStrings.UnqualifiedDataType(storeType));
     }
 }
Example #2
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        protected override void ValidateMapping(CoreTypeMapping mapping, IProperty property)
        {
            var relationalMapping = mapping as RelationalTypeMapping;

            if (_disallowedMappings.Contains(relationalMapping?.StoreType))
            {
                if (property == null)
                {
                    throw new ArgumentException(JetStrings.UnqualifiedDataType(relationalMapping.StoreType));
                }

                throw new ArgumentException(JetStrings.UnqualifiedDataTypeOnProperty(relationalMapping.StoreType, property.Name));
            }
        }