• Home
  • Tutorials
  • API
  • Change Log
  • Github

    Show / Hide Table of Contents
    • DotNetHelper.ObjectToSql
      • SqlGenerator
    • DotNetHelper.ObjectToSql.Attribute
      • DbTableAttribute
      • SqlColumnAttribute
    • DotNetHelper.ObjectToSql.Enum
      • ActionType
      • DataBaseType
      • OutputType
      • ScriptType
      • SerializableType
      • SqlJoinType
    • DotNetHelper.ObjectToSql.Exceptions
      • EmptyArgumentException
      • MissingKeyAttributeException
    • DotNetHelper.ObjectToSql.Extension
      • DBConnectionExtension
      • MemberWrapperExtension
    • DotNetHelper.ObjectToSql.Helper
      • DbTypeMap
      • SqlSyntaxHelper
    • DotNetHelper.ObjectToSql.Model
      • SqlTable
    • DotNetHelper.ObjectToSql.Services
      • DataTableToSql
      • ObjectToSql

    Class ObjectToSql

    Inheritance
    Object
    ObjectToSql
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: DotNetHelper.ObjectToSql.Services
    Assembly: DotNetHelper.ObjectToSql.dll
    Syntax
    public class ObjectToSql

    Constructors

    | Improve this Doc View Source

    ObjectToSql(DataBaseType)

    Declaration
    public ObjectToSql(DataBaseType type)
    Parameters
    Type Name Description
    DataBaseType type
    | Improve this Doc View Source

    ObjectToSql(DataBaseType, Boolean)

    Declaration
    public ObjectToSql(DataBaseType type, bool includeNonPublicAccessor)
    Parameters
    Type Name Description
    DataBaseType type
    Boolean includeNonPublicAccessor

    Properties

    | Improve this Doc View Source

    AlwaysCreateParamaterizedSql

    Declaration
    public bool AlwaysCreateParamaterizedSql { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    DatabaseType

    Declaration
    public DataBaseType DatabaseType { get; }
    Property Value
    Type Description
    DataBaseType
    | Improve this Doc View Source

    IncludeNonPublicAccessor

    Declaration
    public bool IncludeNonPublicAccessor { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    SqlSyntaxHelper

    Declaration
    public SqlSyntaxHelper SqlSyntaxHelper { get; }
    Property Value
    Type Description
    SqlSyntaxHelper

    Methods

    | Improve this Doc View Source

    BuildDbDataParameterList<T>(T, Func<String, Object, IDbDataParameter>)

    Builds the SQL parameter list.

    Declaration
    public List<IDbDataParameter> BuildDbDataParameterList<T>(T instance, Func<string, object, IDbDataParameter> getNewParameter)
    
        where T : class
    Parameters
    Type Name Description
    T instance
    Func<String, Object, IDbDataParameter> getNewParameter
    Returns
    Type Description
    List<IDbDataParameter>

    List<DbParameter>.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    BuildDbDataParameterList<T>(T, Func<String, Object, IDbDataParameter>, Func<Object, String>, Func<Object, String>, Func<Object, String>)

    Builds the SQL parameter list.

    Declaration
    public List<IDbDataParameter> BuildDbDataParameterList<T>(T instance, Func<string, object, IDbDataParameter> getNewParameter, Func<object, string> xmlSerializer, Func<object, string> jsonSerializer, Func<object, string> csvSerializer)
    
        where T : class
    Parameters
    Type Name Description
    T instance
    Func<String, Object, IDbDataParameter> getNewParameter
    Func<Object, String> xmlSerializer
    Func<Object, String> jsonSerializer
    Func<Object, String> csvSerializer
    Returns
    Type Description
    List<IDbDataParameter>

    List<DbParameter>.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    BuildDbParameterList<T>(T, Func<String, Object, DbParameter>)

    Builds the SQL parameter list.

    Declaration
    public List<DbParameter> BuildDbParameterList<T>(T instance, Func<string, object, DbParameter> getNewParameter)
    
        where T : class
    Parameters
    Type Name Description
    T instance
    Func<String, Object, DbParameter> getNewParameter
    Returns
    Type Description
    List<DbParameter>

    List<DbParameter>.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    BuildDbParameterList<T>(T, Func<String, Object, DbParameter>, Func<Object, String>, Func<Object, String>, Func<Object, String>)

    Builds the SQL parameter list.

    Declaration
    public List<DbParameter> BuildDbParameterList<T>(T instance, Func<string, object, DbParameter> getNewParameter, Func<object, string> xmlSerializer, Func<object, string> jsonSerializer, Func<object, string> csvSerializer)
    
        where T : class
    Parameters
    Type Name Description
    T instance
    Func<String, Object, DbParameter> getNewParameter
    Func<Object, String> xmlSerializer
    Func<Object, String> jsonSerializer
    Func<Object, String> csvSerializer
    Returns
    Type Description
    List<DbParameter>

    List<DbParameter>.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    BuildQuery(ActionType, Object, String)

    Declaration
    public string BuildQuery(ActionType actionType, object instance, string tableName = null)
    Parameters
    Type Name Description
    ActionType actionType
    Object instance
    String tableName
    Returns
    Type Description
    String
    | Improve this Doc View Source

    BuildQuery<T>(ActionType, String)

    Declaration
    public string BuildQuery<T>(ActionType actionType, string tableName = null)
    
        where T : class
    Parameters
    Type Name Description
    ActionType actionType
    String tableName
    Returns
    Type Description
    String
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    BuildQuery<T>(ActionType, String, Expression<Func<T, Object>>[])

    Declaration
    public string BuildQuery<T>(ActionType actionType, string tableName = null, params Expression<Func<T, object>>[] primaryKeys)
    
        where T : class
    Parameters
    Type Name Description
    ActionType actionType
    String tableName
    Expression<Func<T, Object>>[] primaryKeys
    Returns
    Type Description
    String
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    BuildQueryWithOutputs<T>(ActionType, Expression<Func<T, Object>>[])

    Declaration
    public string BuildQueryWithOutputs<T>(ActionType actionType, params Expression<Func<T, object>>[] outputFields)
    
        where T : class
    Parameters
    Type Name Description
    ActionType actionType
    Expression<Func<T, Object>>[] outputFields
    Returns
    Type Description
    String
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    BuildQueryWithOutputs<T>(ActionType, String, Expression<Func<T, Object>>[])

    Declaration
    public string BuildQueryWithOutputs<T>(ActionType actionType, string tableName = null, params Expression<Func<T, object>>[] outputFields)
    
        where T : class
    Parameters
    Type Name Description
    ActionType actionType
    String tableName
    Expression<Func<T, Object>>[] outputFields
    Returns
    Type Description
    String
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    ConvertToDatabaseValue(MemberWrapper, Object, Func<Object, String>, Func<Object, String>, Func<Object, String>)

    Converts to database value. If value is null convert it to DBNull.Value or if property is decorated with a serializable attribute then convert the value to its serialize self

    Declaration
    public object ConvertToDatabaseValue(MemberWrapper member, object value, Func<object, string> xmlSerializer, Func<object, string> jsonSerializer, Func<object, string> csvSerializer)
    Parameters
    Type Name Description
    DotNetHelper.FastMember.Extension.Models.MemberWrapper member

    The member.

    Object value

    The value.

    Func<Object, String> xmlSerializer
    Func<Object, String> jsonSerializer
    Func<Object, String> csvSerializer
    Returns
    Type Description
    Object

    System.Object.

    | Improve this Doc View Source

    GetAllNonIgnoreFields(Type, Boolean)

    Gets all non ignore fields.

    Declaration
    public List<MemberWrapper> GetAllNonIgnoreFields(Type type, bool includeNonPublicAccessor)
    Parameters
    Type Name Description
    Type type
    Boolean includeNonPublicAccessor
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    | Improve this Doc View Source

    GetAllNonIgnoreFields<T>(T, Boolean)

    Gets all non ignore fields.

    Declaration
    public List<MemberWrapper> GetAllNonIgnoreFields<T>(T instance, bool includeNonPublicAccessor)
    
        where T : class
    Parameters
    Type Name Description
    T instance
    Boolean includeNonPublicAccessor
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetAllNonIgnoreFields<T>(Boolean)

    Gets all non ignore fields.

    Declaration
    public List<MemberWrapper> GetAllNonIgnoreFields<T>(bool includeNonPublicAccessor)
    
        where T : class
    Parameters
    Type Name Description
    Boolean includeNonPublicAccessor
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetKeyFields(Boolean, Type)

    Gets the key fields.

    Declaration
    public List<MemberWrapper> GetKeyFields(bool includeNonPublicAccessor, Type type)
    Parameters
    Type Name Description
    Boolean includeNonPublicAccessor
    Type type
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    | Improve this Doc View Source

    GetKeyFields<T>(Boolean)

    Gets the key fields.

    Declaration
    public List<MemberWrapper> GetKeyFields<T>(bool includeNonPublicAccessor)
    
        where T : class
    Parameters
    Type Name Description
    Boolean includeNonPublicAccessor
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetNonIdentityFields(Boolean, Type)

    Gets the non identity fields.

    Declaration
    public List<MemberWrapper> GetNonIdentityFields(bool includeNonPublicAccessor, Type type)
    Parameters
    Type Name Description
    Boolean includeNonPublicAccessor
    Type type
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    | Improve this Doc View Source

    GetNonIdentityFields(Boolean, Type, Object)

    Gets the non identity fields.

    Declaration
    public List<MemberWrapper> GetNonIdentityFields(bool includeNonPublicAccessor, Type type, object instance)
    Parameters
    Type Name Description
    Boolean includeNonPublicAccessor
    Type type
    Object instance
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    | Improve this Doc View Source

    GetNonIdentityFields<T>(Boolean)

    Gets the non identity fields.

    Declaration
    public List<MemberWrapper> GetNonIdentityFields<T>(bool includeNonPublicAccessor)
    
        where T : class
    Parameters
    Type Name Description
    Boolean includeNonPublicAccessor
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetNonKeyFields(Boolean, Type)

    Gets the non primary key fields.

    Declaration
    public List<MemberWrapper> GetNonKeyFields(bool includeNonPublicAccessor, Type type)
    Parameters
    Type Name Description
    Boolean includeNonPublicAccessor
    Type type
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    | Improve this Doc View Source

    GetNonKeyFields<T>(Boolean)

    Gets the non primary key fields.

    Declaration
    public List<MemberWrapper> GetNonKeyFields<T>(bool includeNonPublicAccessor)
    
        where T : class
    Parameters
    Type Name Description
    Boolean includeNonPublicAccessor
    Returns
    Type Description
    List<DotNetHelper.FastMember.Extension.Models.MemberWrapper>

    List<MemberWrapper>.

    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Joseph McNeal Jr