MicroLite.Builder.SelectSqlBuilder.From C# (CSharp) Method

From() public method

public From ( Type forType ) : IWhereOrOrderBy
forType System.Type
return IWhereOrOrderBy
        public IWhereOrOrderBy From(Type forType)
        {
            var objectInfo = ObjectInfo.For(forType);

            return this.From(objectInfo);
        }

Same methods

SelectSqlBuilder::From ( IObjectInfo objectInfo ) : IWhereOrOrderBy
SelectSqlBuilder::From ( string table ) : IWhereOrOrderBy

Usage Example

        public void FromThrowsArgumentExceptionForEmptyTableName()
        {
            var sqlBuilder = new SelectSqlBuilder(SqlCharacters.Empty);

            var exception = Assert.Throws<ArgumentException>(
                () => sqlBuilder.From(""));

            Assert.Equal(ExceptionMessages.ArgumentNullOrEmpty.FormatWith("table"), exception.Message);
        }
All Usage Examples Of MicroLite.Builder.SelectSqlBuilder::From