Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="navigationPropertyExpression"></param>
        /// <returns></returns>
        public DependentNavigationPropertyConfiguration <TTargetEntity, TEntityType> WithMany(Expression <Func <TTargetEntity, IEnumerable <TEntityType> > > navigationPropertyExpression)
        {
            var config = new DependentNavigationPropertyConfiguration <TTargetEntity, TEntityType>();

            _actions.Add(p =>
            {
                var builder = p.WithMany(navigationPropertyExpression);
                config.Apply(builder);
            });

            return(config);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="expr"></param>
        /// <returns></returns>
        public DependentNavigationPropertyConfiguration <TEntityType, TTargetEntity> WithRequired(Expression <Func <TTargetEntity, TEntityType> > expr)
        {
            DependentNavigationPropertyConfiguration <TEntityType, TTargetEntity> config = new DependentNavigationPropertyConfiguration <TEntityType, TTargetEntity>();

            _actions.Add(p =>
            {
                var builder = p.WithOne(expr).IsRequired();
                config.Apply(builder);
            });

            return(config);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public DependentNavigationPropertyConfiguration <TTargetEntity, TEntityType> WithMany()
        {
            var config = new DependentNavigationPropertyConfiguration <TTargetEntity, TEntityType>();

            _actions.Add(p =>
            {
                var builder = p.WithMany();
                config.Apply(builder);
            });

            return(config);
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public DependentNavigationPropertyConfiguration <TEntityType, TTargetEntity> WithOptional()
        {
            DependentNavigationPropertyConfiguration <TEntityType, TTargetEntity> config = new DependentNavigationPropertyConfiguration <TEntityType, TTargetEntity>();

            _actions.Add(p =>
            {
                var builder = p.WithOne();
                config.Apply(builder);
            });

            return(config);
        }