Beispiel #1
0
        /// <summary>
        /// Maps the ef core property.
        /// </summary>
        /// <param name="objectExtensionManager">The object extension manager.</param>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="propertyType">Type of the property.</param>
        /// <param name="propertyName">Name of the property.</param>
        /// <param name="propertyBuildAction">The property build action.</param>
        /// <returns>ObjectExtensionManager.</returns>
        public static ObjectExtensionManager MapEfCoreProperty(
            [NotNull] this ObjectExtensionManager objectExtensionManager,
            [NotNull] Type entityType,
            [NotNull] Type propertyType,
            [NotNull] string propertyName,
            [CanBeNull] Action <PropertyBuilder> propertyBuildAction = null)
        {
            Check.NotNull(objectExtensionManager, nameof(objectExtensionManager));

            return(objectExtensionManager.AddOrUpdateProperty(
                       entityType,
                       propertyType,
                       propertyName,
                       options =>
            {
                options.MapEfCore(
                    propertyBuildAction
                    );
            }
                       ));
        }