public void BuildSelect_many_column_update()
        {
            //Arrange
            var qty = 10;
            Expression <Func <Entity_Select_Column_Test, Entity_Select_Column_Test> > predicate = n => new Entity_Select_Column_Test()
            {
                Code = "123", CreatedOn = DateTime.Parse("2018-02-06"), Quantity = qty + 10, Status = OrderStatus.Paid
            };
            Dictionary <string, object> args = new Dictionary <string, object>();
            //Action
            var actual = _builder.BuildSelect(predicate, out args).Trim();
            // Assert
            var expected = "[Code] = @Code,[CreatedOn] = @CreatedOn,[Quantity] = @Quantity,[Status] = @Status";

            Assert.AreEqual(expected, actual);
            // args
            Assert.AreEqual("123", args["@Code"]);
            Assert.AreEqual(DateTime.Parse("2018-02-06"), args["@CreatedOn"]);
            Assert.AreEqual(20, args["@Quantity"]);
            Assert.AreEqual(2, args["@Status"]);
        }
        public string BuildUpdate <TEntity>(Expression <Func <TEntity, TEntity> > columns, Expression <Func <TEntity, bool> > where, out object argumnets)
        {
            var table = this._dialectBuilder.GetTable(typeof(TEntity));
            // set column
            Dictionary <string, object> columnsArgments = new Dictionary <string, object>();
            var updateFields = _selectUpdateBuilder.BuildSelect(columns, out columnsArgments);
            Dictionary <string, object> queryArgments = new Dictionary <string, object>();
            var condition = _lamdaBuilder.BuildWhere(where, out queryArgments);
            var args      = columnsArgments.Concat(queryArgments).ToDictionary(n => n.Key, n => n.Value);

            argumnets = args;
            var sql = string.Format("UPDATE {0} SET {1} WHERE {2} ", table, updateFields, condition);

            return(sql);
        }