コード例 #1
0
        /// <summary>
        /// Delete the specified employee.
        /// </summary>
        /// <param name="code">The code to consider.</param>
        /// <returns>Returns the generated query.</returns>
        internal IDbQuery DeleteEmployee1(string code)
        {
            var query = DbFluent.DeleteQuery(Table <DbEmployee>())
                        .AddIdField(DbFluent.FieldAsLiteral <DbEmployee>(p => p.Code, code));

            return(query);
        }
コード例 #2
0
        public void AddFields()
        {
            var log = new BdoLog();

            var tuple = DbFluent.Tuple(
                DbFluent.Field("field1", DbFluent.Table("Table1")),
                DbFluent.Field("field2", DbFluent.Table("Table1")),
                DbFluent.Field("field3", DbFluent.Table("Table1")).WithAlias("f3"))
                        .AddFields(
                DbFluent.FieldAsLiteral("field1", 1),
                DbFluent.FieldAsLiteral("field2", DbFluent.Table("Table2"), 2).WithAlias("f3"));

            Assert.That(tuple.Fields.Count == 3, "Bad script interpretation");
        }