Class EntityUtilExtensions
Inheritance
System.Object
EntityUtilExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: FreeSql.dll
Syntax
public static class EntityUtilExtensions
Methods
|
Improve this Doc
View Source
AppendEntityUpdateSetWithColumn<TEntity>(IUpdate<TEntity>, Type, LambdaExpression)
Declaration
public static void AppendEntityUpdateSetWithColumn<TEntity>(this IUpdate<TEntity> update, Type columnType, LambdaExpression setExp)
where TEntity : class
Parameters
| Type |
Name |
Description |
| IUpdate<TEntity> |
update |
|
| System.Type |
columnType |
|
| System.Linq.Expressions.LambdaExpression |
setExp |
|
Type Parameters
|
Improve this Doc
View Source
ClearEntityPrimaryValueWithIdentity(IFreeSql, Type, Object)
清除实体的主键值,将自增、Guid类型的主键值清除
Declaration
public static void ClearEntityPrimaryValueWithIdentity(this IFreeSql orm, Type entityType, object entity)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
|
Improve this Doc
View Source
ClearEntityPrimaryValueWithIdentityAndGuid(IFreeSql, Type, Object)
清除实体的主键值,将自增、Guid类型的主键值清除
Declaration
public static void ClearEntityPrimaryValueWithIdentityAndGuid(this IFreeSql orm, Type entityType, object entity)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
|
Improve this Doc
View Source
CompareEntityValueReturnColumns(IFreeSql, Type, Object, Object, Boolean)
Declaration
public static string[] CompareEntityValueReturnColumns(this IFreeSql orm, Type entityType, object entity1, object entity2, bool isEqual)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity1 |
|
| System.Object |
entity2 |
|
| System.Boolean |
isEqual |
|
Returns
| Type |
Description |
| System.String[] |
|
|
Improve this Doc
View Source
GetEntityIdentityValueWithPrimary(IFreeSql, Type, Object)
Declaration
public static long GetEntityIdentityValueWithPrimary(this IFreeSql orm, Type entityType, object entity)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
Returns
| Type |
Description |
| System.Int64 |
|
|
Improve this Doc
View Source
GetEntityKeyString(IFreeSql, Type, Object, Boolean, String)
获取实体的主键值,以 "|,[,|" 分割,当任意一个主键属性无值时,返回 null
Declaration
public static string GetEntityKeyString(this IFreeSql orm, Type entityType, object entity, bool genGuid, string splitString = "*|_,[,_|*")
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
| System.Boolean |
genGuid |
当Guid无值时,会生成有序的新值
|
| System.String |
splitString |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetEntityKeyValues(IFreeSql, Type, Object)
Declaration
public static object[] GetEntityKeyValues(this IFreeSql orm, Type entityType, object entity)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
Returns
| Type |
Description |
| System.Object[] |
|
|
Improve this Doc
View Source
GetEntityString(IFreeSql, Type, Object)
获取实体的所有数据,以 (1, 2, xxx) 的形式
Declaration
public static string GetEntityString(this IFreeSql orm, Type entityType, object entity)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetEntityValueWithPropertyName(IFreeSql, Type, Object, String)
Declaration
public static object GetEntityValueWithPropertyName(this IFreeSql orm, Type entityType, object entity, string propertyName)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
| System.String |
propertyName |
|
Returns
| Type |
Description |
| System.Object |
|
|
Improve this Doc
View Source
GetPropertyValue(TableInfo, Object, String)
Declaration
public static object GetPropertyValue(this TableInfo table, object entity, string propertyName)
Parameters
| Type |
Name |
Description |
| TableInfo |
table |
|
| System.Object |
entity |
|
| System.String |
propertyName |
|
Returns
| Type |
Description |
| System.Object |
|
|
Improve this Doc
View Source
MapEntityKeyValue(IFreeSql, Type, Object, Object)
Declaration
public static void MapEntityKeyValue(this IFreeSql orm, Type entityType, object entityFrom, object entityTo)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entityFrom |
|
| System.Object |
entityTo |
|
|
Improve this Doc
View Source
MapEntityValue(IFreeSql, Type, Object, Object)
Declaration
public static void MapEntityValue(this IFreeSql orm, Type entityType, object entityFrom, object entityTo)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entityFrom |
|
| System.Object |
entityTo |
|
|
Improve this Doc
View Source
SetEntityIdentityValueWithPrimary(IFreeSql, Type, Object, Int64)
Declaration
public static void SetEntityIdentityValueWithPrimary(this IFreeSql orm, Type entityType, object entity, long idtval)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
| System.Int64 |
idtval |
|
|
Improve this Doc
View Source
SetEntityIncrByWithPropertyName(IFreeSql, Type, Object, String, Int32)
Declaration
public static void SetEntityIncrByWithPropertyName(this IFreeSql orm, Type entityType, object entity, string propertyName, int incrBy)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
| System.String |
propertyName |
|
| System.Int32 |
incrBy |
|
|
Improve this Doc
View Source
SetEntityValueWithPropertyName(IFreeSql, Type, Object, String, Object)
Declaration
public static void SetEntityValueWithPropertyName(this IFreeSql orm, Type entityType, object entity, string propertyName, object value)
Parameters
| Type |
Name |
Description |
| IFreeSql |
orm |
|
| System.Type |
entityType |
|
| System.Object |
entity |
|
| System.String |
propertyName |
|
| System.Object |
value |
|
|
Improve this Doc
View Source
SetPropertyValue(TableInfo, Object, String, Object)
Declaration
public static void SetPropertyValue(this TableInfo table, object entity, string propertyName, object value)
Parameters
| Type |
Name |
Description |
| TableInfo |
table |
|
| System.Object |
entity |
|
| System.String |
propertyName |
|
| System.Object |
value |
|