Ejemplo n.º 1
0
        public void UpdateDbSetInfo(DbSetInfo dbSetInfo, Type entityType, Type contextType, IShamanLogger logger)
        {
            if (string.IsNullOrEmpty(dbSetInfo.Schema))
            {
                dbSetInfo.Schema = "dbo";
            }

            var collation = GetCollation(entityType.GetTypeInfo());

            if (string.IsNullOrEmpty(collation))
            {
                return;
            }
            var target = $"table {dbSetInfo.GetSqlTableName()}";

            UpdateAnnotation(dbSetInfo, collation, logger, target);
        }
        public void UpdateDbSetInfo(DbSetInfo dbSetInfo, Type entityType, Type contextType, IShamanLogger logger)
        {
            var target = $"table {dbSetInfo.GetSqlTableName()}";

            if (string.IsNullOrEmpty(dbSetInfo.Schema))
            {
                dbSetInfo.Schema = UseDefaultTableSchema;
                logger.Log(nameof(SqlServerReflectionService),
                           $"Set table schema '{dbSetInfo.Schema}' for {target}, entity={entityType}");
            }

            var collation = GetCollation(entityType.GetTypeInfo());

            if (string.IsNullOrEmpty(collation))
            {
                return;
            }
            UpdateAnnotation(dbSetInfo, collation, logger, target);
        }