Пример #1
0
        public static string CreateUpdate <T>(DbKind targetDatabase, bool setIdentity, params Expression <Func <T, object> >[] properties)
        {
            var propertyNames = properties == null || properties.Length == 0
                                ? null
                                : ExpressionHelper.GetMemberNames(properties);

            return(This.CreateUpdate(targetDatabase, typeof(T), propertyNames, setIdentity));
        }
Пример #2
0
        /// <summary>
        /// 指定された型情報から、対象となるテーブルのレコードを指定されたプロパティにマッピングされている列に絞って更新するクエリを生成します。
        /// </summary>
        /// <typeparam name="T">テーブルの型</typeparam>
        /// <param name="targetDatabase">対象データベース</param>
        /// <param name="properties">抽出する列にマッピングされるプロパティのコレクション。指定がない場合はすべての列を抽出対象とします。</param>
        /// <param name="setIdentity">自動採番のID列に値を設定するかどうか</param>
        /// <returns>生成されたSQL</returns>
        public static string CreateUpdate <T>(DbKind targetDatabase, Expression <Func <T, object> > properties = null, bool setIdentity = false)
        {
            var propertyNames = properties == null
                                ? null
                                : ExpressionHelper.GetMemberNames(properties);

            return(This.CreateUpdate(targetDatabase, typeof(T), propertyNames, setIdentity));
        }
Пример #3
0
 public static string CreateUpdate(DbKind targetDatabase, Type type, bool setIdentity, params string[] propertyNames)
 => This.CreateUpdate(targetDatabase, type, propertyNames, setIdentity);
Пример #4
0
 public static string CreateUpdate(DbKind targetDatabase, Type type, params string[] propertyNames)
 => This.CreateUpdate(targetDatabase, type, propertyNames, false);
Пример #5
0
 public static string CreateUpdate <T>(DbKind targetDatabase, params Expression <Func <T, object> >[] properties)
 => This.CreateUpdate <T>(targetDatabase, false, properties);