Class CodeFirstProvider
Inheritance
System.Object
CodeFirstProvider
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 abstract class CodeFirstProvider : ICodeFirst
Constructors
|
Improve this Doc
View Source
CodeFirstProvider(IFreeSql, CommonUtils, CommonExpression)
Declaration
public CodeFirstProvider(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression)
Parameters
Fields
|
Improve this Doc
View Source
_commonExpression
Declaration
public CommonExpression _commonExpression
Field Value
|
Improve this Doc
View Source
_commonUtils
Declaration
public CommonUtils _commonUtils
Field Value
|
Improve this Doc
View Source
_dicSynced
Declaration
public ConcurrentDictionary<Type, ConcurrentDictionary<string, bool>> _dicSynced
Field Value
| Type |
Description |
| System.Collections.Concurrent.ConcurrentDictionary<System.Type, System.Collections.Concurrent.ConcurrentDictionary<System.String, System.Boolean>> |
|
|
Improve this Doc
View Source
_orm
Declaration
Field Value
| Type |
Description |
| IFreeSql |
|
Properties
|
Improve this Doc
View Source
IsAutoSyncStructure
Declaration
public virtual bool IsAutoSyncStructure { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsConfigEntityFromDbFirst
Declaration
public bool IsConfigEntityFromDbFirst { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsGenerateCommandParameterWithLambda
Declaration
public virtual bool IsGenerateCommandParameterWithLambda { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsLazyLoading
Declaration
public bool IsLazyLoading { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsNoneCommandParameter
Declaration
public virtual bool IsNoneCommandParameter { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsSyncStructureToLower
Declaration
public bool IsSyncStructureToLower { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsSyncStructureToUpper
Declaration
public bool IsSyncStructureToUpper { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
|
Improve this Doc
View Source
_dicSycedTryAdd(Type, String)
Declaration
public void _dicSycedTryAdd(Type entityType, string tableName = null)
Parameters
| Type |
Name |
Description |
| System.Type |
entityType |
|
| System.String |
tableName |
|
|
Improve this Doc
View Source
ConfigEntity(Type, Action<TableFluent>)
Declaration
public ICodeFirst ConfigEntity(Type type, Action<TableFluent> entity)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
| System.Action<TableFluent> |
entity |
|
Returns
|
Improve this Doc
View Source
ConfigEntity<T>(Action<TableFluent<T>>)
Declaration
public ICodeFirst ConfigEntity<T>(Action<TableFluent<T>> entity)
Parameters
| Type |
Name |
Description |
| System.Action<TableFluent<T>> |
entity |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ExecuteDDLStatements(String)
Declaration
public virtual int ExecuteDDLStatements(string ddl)
Parameters
| Type |
Name |
Description |
| System.String |
ddl |
|
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
GetComparisonDDLStatements(CodeFirstProvider.TypeAndName[])
Declaration
protected abstract string GetComparisonDDLStatements(params CodeFirstProvider.TypeAndName[] objects)
Parameters
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetComparisonDDLStatements(Type, String)
Declaration
public string GetComparisonDDLStatements(Type entityType, string tableName)
Parameters
| Type |
Name |
Description |
| System.Type |
entityType |
|
| System.String |
tableName |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetComparisonDDLStatements(Type[])
Declaration
public string GetComparisonDDLStatements(params Type[] entityTypes)
Parameters
| Type |
Name |
Description |
| System.Type[] |
entityTypes |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetComparisonDDLStatements<TEntity>()
Declaration
public string GetComparisonDDLStatements<TEntity>()
Returns
| Type |
Description |
| System.String |
|
Type Parameters
|
Improve this Doc
View Source
GetConfigEntity(Type)
Declaration
public TableAttribute GetConfigEntity(Type type)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
Returns
|
Improve this Doc
View Source
GetDbInfo(Type)
Declaration
public abstract DbInfoResult GetDbInfo(Type type)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
Returns
|
Improve this Doc
View Source
GetTableByEntity(Type)
Declaration
public TableInfo GetTableByEntity(Type type)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
Returns
|
Improve this Doc
View Source
GetTableNameLowerOrUpper(String)
Declaration
protected string GetTableNameLowerOrUpper(string tableName)
Parameters
| Type |
Name |
Description |
| System.String |
tableName |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
ReplaceIndexName(String, String)
Declaration
public static string ReplaceIndexName(string indexName, string tbname)
Parameters
| Type |
Name |
Description |
| System.String |
indexName |
|
| System.String |
tbname |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
SyncStructure(CodeFirstProvider.TypeAndName[])
Declaration
protected void SyncStructure(params CodeFirstProvider.TypeAndName[] objects)
Parameters
|
Improve this Doc
View Source
SyncStructure(Type, String, Boolean)
Declaration
public void SyncStructure(Type entityType, string tableName, bool isForceSync)
Parameters
| Type |
Name |
Description |
| System.Type |
entityType |
|
| System.String |
tableName |
|
| System.Boolean |
isForceSync |
|
|
Improve this Doc
View Source
SyncStructure(Type[])
Declaration
public void SyncStructure(params Type[] entityTypes)
Parameters
| Type |
Name |
Description |
| System.Type[] |
entityTypes |
|
|
Improve this Doc
View Source
SyncStructure<TEntity>()
Declaration
public void SyncStructure<TEntity>()
Type Parameters
Implements
Extension Methods
FreeSqlGlobalDynamicEntityExtensions.DynamicEntity(FreeSql.ICodeFirst, System.String, System.Attribute[])