Search Results for

    Show / Hide Table of Contents

    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()
    Namespace: FreeSql.Extensions.EntityUtil
    Assembly: FreeSql.dll
    Syntax
    public static class EntityUtilExtensions

    Methods

    | Improve this Doc View Source

    AppendEntityUpdateSetWithColumn<TEntity>(IUpdate<TEntity>, Type, LambdaExpression)

    缓存执行 IUpdate.Set

    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
    Name Description
    TEntity
    | 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
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX