Esempio n. 1
0
        public IQueryBuilderJoinOrSelect From <T>(string tableAlias = null)
        {
            var type          = typeof(T);
            var tableAliasKey = tableAlias ?? type.Name;

            TableFrom = new KeyValuePair <string, Type>(tableAliasKey, type);
            _translator.AddTable(type, TableFrom.Key);

            return(this);
        }
Esempio n. 2
0
        public IQueryBuilderValues InsertInto <T>(Expression <Func <T, object> > lambda)
        {
            var type          = typeof(T);
            var tableAliasKey = type.Name;

            TableInto = new KeyValuePair <string, Type>(tableAliasKey, type);
            _translator.AddTable(type, TableInto.Key);

            Columns.AddRange(_translator.Translate(typeof(T), lambda, null));
            return(this);
        }