Exemplo n.º 1
0
 /// <summary>
 /// Configure server type entity
 /// </summary>
 /// <param name="serverType">Database server type</param>
 /// <param name="entityType">Entity type</param>
 /// <param name="entityConfiguration">Entity configuration</param>
 static void ConfigureDatabaseServerEntity(DatabaseServerType serverType, Type entityType, DataEntityConfiguration entityConfiguration)
 {
     if (entityConfiguration == null)
     {
         return;
     }
     //Configure object name
     ConfigureEntityObjectName(serverType, entityType, entityConfiguration.TableName);
     //Configure fields
     ConfigureEntityFields(serverType, entityType, entityConfiguration.Fields);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Configure server type entity
        /// </summary>
        /// <param name="serverType">Database server type</param>
        /// <param name="entityType">Entity type</param>
        /// <param name="entityConfiguration">Entity configuration</param>
        static void ConfigureDatabaseServerEntity(DatabaseServerType serverType, Type entityType, DataEntityConfiguration entityConfiguration, bool cover = true)
        {
            if (entityConfiguration == null)
            {
                return;
            }
            string key = serverType.GetDatabaseServerEntityFormatKey(entityType);

            if (string.IsNullOrWhiteSpace(key))
            {
                return;
            }
            //Configure object name
            ConfigureEntityObjectName(key, entityConfiguration.TableName, cover);
            //Configure fields
            ConfigureEntityFields(key, entityType, entityConfiguration.Fields, cover);
        }