Class ObjectToSql
Assembly: DotNetHelper.ObjectToSql.dll
Syntax
Constructors
|
Improve this Doc
View Source
ObjectToSql(DataBaseType)
Declaration
public ObjectToSql(DataBaseType type)
Parameters
|
Improve this Doc
View Source
ObjectToSql(DataBaseType, Boolean)
Declaration
public ObjectToSql(DataBaseType type, bool includeNonPublicAccessor)
Parameters
Properties
|
Improve this Doc
View Source
AlwaysCreateParamaterizedSql
Declaration
public bool AlwaysCreateParamaterizedSql { get; set; }
Property Value
|
Improve this Doc
View Source
DatabaseType
Declaration
public DataBaseType DatabaseType { get; }
Property Value
|
Improve this Doc
View Source
IncludeNonPublicAccessor
Declaration
public bool IncludeNonPublicAccessor { get; set; }
Property Value
|
Improve this Doc
View Source
SqlSyntaxHelper
Declaration
public SqlSyntaxHelper SqlSyntaxHelper { get; }
Property Value
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
Returns
Type Parameters
|
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
Returns
Type Parameters
|
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
Returns
Type Parameters
|
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
Returns
Type Parameters
|
Improve this Doc
View Source
BuildQuery(ActionType, Object, String)
Declaration
public string BuildQuery(ActionType actionType, object instance, string tableName = null)
Parameters
Returns
|
Improve this Doc
View Source
BuildQuery<T>(ActionType, String)
Declaration
public string BuildQuery<T>(ActionType actionType, string tableName = null)
where T : class
Parameters
Returns
Type Parameters
|
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
Returns
Type Parameters
|
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
Returns
Type Parameters
|
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
Returns
Type Parameters
|
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
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
|
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
|
Improve this Doc
View Source
GetKeyFields(Boolean, Type)
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)
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
|
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
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
|
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