Merge branch 'rel-4.0' into dev

pull/6532/head
Halil İbrahim Kalkan 4 years ago
commit 1a138d7bdf

@ -1,11 +1,11 @@
# Exception Handling # Exception Handling
ABP provides a built-in infrastructure and offers a standard model for handling exceptions in a web application. ABP provides a built-in infrastructure and offers a standard model for handling exceptions.
* Automatically **handles all exceptions** and sends a standard **formatted error message** to the client for an API/AJAX request. * Automatically **handles all exceptions** and sends a standard **formatted error message** to the client for an API/AJAX request.
* Automatically hides **internal infrastructure errors** and returns a standard error message. * Automatically hides **internal infrastructure errors** and returns a standard error message.
* Provides a configurable way to **localize** exception messages. * Provides an easy and configurable way to **localize** exception messages.
* Automatically maps standard exceptions to **HTTP status codes** and provides a configurable option to map these to custom exceptions. * Automatically maps standard exceptions to **HTTP status codes** and provides a configurable option to map custom exceptions.
## Automatic Exception Handling ## Automatic Exception Handling

@ -1,13 +1,13 @@
// using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
//
// namespace Microsoft.EntityFrameworkCore namespace Microsoft.EntityFrameworkCore
// { {
// public static class AbpOracleModelBuilderExtensions public static class AbpOracleModelBuilderExtensions
// { {
// public static void UseOracle( public static void UseOracle(
// this ModelBuilder modelBuilder) this ModelBuilder modelBuilder)
// { {
// modelBuilder.SetDatabaseProvider(EfCoreDatabaseProvider.Oracle); modelBuilder.SetDatabaseProvider(EfCoreDatabaseProvider.Oracle);
// } }
// } }
// } }

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<!--<PackageReference Include="Devart.Data.Oracle.EFCore" Version="9.11.1034" />--> <PackageReference Include="Devart.Data.Oracle.EFCore" Version="9.14.1150" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -1,27 +1,34 @@
// using JetBrains.Annotations; using JetBrains.Annotations;
// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
// using System; using System;
// using Devart.Data.Oracle.Entity; using Devart.Data.Oracle.Entity;
// using Volo.Abp.EntityFrameworkCore.DependencyInjection; using Volo.Abp.EntityFrameworkCore.DependencyInjection;
//
// namespace Volo.Abp.EntityFrameworkCore namespace Volo.Abp.EntityFrameworkCore
// { {
// public static class AbpDbContextConfigurationContextOracleDevartExtensions public static class AbpDbContextConfigurationContextOracleDevartExtensions
// { {
// public static DbContextOptionsBuilder UseOracle( public static DbContextOptionsBuilder UseOracle(
// [NotNull] this AbpDbContextConfigurationContext context, [NotNull] this AbpDbContextConfigurationContext context,
// [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null, [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null,
// bool useExistingConnectionIfAvailable = false) bool useExistingConnectionIfAvailable = false)
// { {
// TODO: UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); if (useExistingConnectionIfAvailable && context.ExistingConnection != null)
// if (useExistingConnectionIfAvailable && context.ExistingConnection != null) {
// { return context.DbContextOptions.UseOracle(context.ExistingConnection, optionsBuilder =>
// return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); {
// } optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
// else oracleOptionsAction?.Invoke(optionsBuilder);
// { });
// return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); }
// } else
// } {
// } return context.DbContextOptions.UseOracle(context.ConnectionString, optionsBuilder =>
// } {
optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
oracleOptionsAction?.Invoke(optionsBuilder);
});
}
}
}
}

@ -1,32 +1,32 @@
// using JetBrains.Annotations; using JetBrains.Annotations;
// using System; using System;
// using Devart.Data.Oracle.Entity; using Devart.Data.Oracle.Entity;
//
// namespace Volo.Abp.EntityFrameworkCore namespace Volo.Abp.EntityFrameworkCore
// { {
// public static class AbpDbContextOptionsOracleDevartExtensions public static class AbpDbContextOptionsOracleDevartExtensions
// { {
// public static void UseOracle( public static void UseOracle(
// [NotNull] this AbpDbContextOptions options, [NotNull] this AbpDbContextOptions options,
// [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null, [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null,
// bool useExistingConnectionIfAvailable = false) bool useExistingConnectionIfAvailable = false)
// { {
// options.Configure(context => options.Configure(context =>
// { {
// context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable); context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable);
// }); });
// } }
//
// public static void UseOracle<TDbContext>( public static void UseOracle<TDbContext>(
// [NotNull] this AbpDbContextOptions options, [NotNull] this AbpDbContextOptions options,
// [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null, [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null,
// bool useExistingConnectionIfAvailable = false) bool useExistingConnectionIfAvailable = false)
// where TDbContext : AbpDbContext<TDbContext> where TDbContext : AbpDbContext<TDbContext>
// { {
// options.Configure<TDbContext>(context => options.Configure<TDbContext>(context =>
// { {
// context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable); context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable);
// }); });
// } }
// } }
// } }

@ -1,22 +1,22 @@
// using Volo.Abp.Guids; using Volo.Abp.Guids;
// using Volo.Abp.Modularity; using Volo.Abp.Modularity;
//
// namespace Volo.Abp.EntityFrameworkCore.Oracle.Devart namespace Volo.Abp.EntityFrameworkCore.Oracle.Devart
// { {
// [DependsOn( [DependsOn(
// typeof(AbpEntityFrameworkCoreModule) typeof(AbpEntityFrameworkCoreModule)
// )] )]
// public class AbpEntityFrameworkCoreOracleDevartModule : AbpModule public class AbpEntityFrameworkCoreOracleDevartModule : AbpModule
// { {
// public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
// { {
// Configure<AbpSequentialGuidGeneratorOptions>(options => Configure<AbpSequentialGuidGeneratorOptions>(options =>
// { {
// if (options.DefaultSequentialGuidType == null) if (options.DefaultSequentialGuidType == null)
// { {
// options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary;
// } }
// }); });
// } }
// } }
// } }

@ -5,7 +5,7 @@ export const enum Exception {
InvalidModule = '[Invalid Module] Backend module "{0}" does not exist in API definition.', InvalidModule = '[Invalid Module] Backend module "{0}" does not exist in API definition.',
InvalidApiDefinition = '[Invalid API Definition] The provided API definition is invalid.', InvalidApiDefinition = '[Invalid API Definition] The provided API definition is invalid.',
InvalidWorkspace = '[Invalid Workspace] The angular.json should be a valid JSON file.', InvalidWorkspace = '[Invalid Workspace] The angular.json should be a valid JSON file.',
NoApi = '[API Not Available] Please double-check the URL in the source project environment and make sure your application is up and running.', NoApi = '[API Not Available] Request to {0} is unsuccessful. Please double-check the URL in the source project environment and make sure your application is up and running.',
NoProject = '[Project Not Found] Either define a default project in your workspace or specify the project name in schematics options.', NoProject = '[Project Not Found] Either define a default project in your workspace or specify the project name in schematics options.',
NoProxyConfig = '[Proxy Config Not Found] There is no JSON file at "{0}".', NoProxyConfig = '[Proxy Config Not Found] There is no JSON file at "{0}".',
NoTypeDefinition = '[Type Definition Not Found] There is no type definition for "{0}".', NoTypeDefinition = '[Type Definition Not Found] There is no type definition for "{0}".',

@ -36,7 +36,7 @@ async function getApiDefinition(sourceUrl: string) {
} catch ({ response }) { } catch ({ response }) {
// handle redirects // handle redirects
if (!response?.body || response.statusCode >= 400) if (!response?.body || response.statusCode >= 400)
throw new SchematicsException(Exception.NoApi); throw new SchematicsException(interpolate(Exception.NoApi, url));
body = response.body; body = response.body;
} }

@ -21,7 +21,7 @@ export class TypeNode {
if (!self) return ''; if (!self) return '';
const representation = self + this.children.filter(String || Boolean).join(', '); const representation = self + this.children.filter(String).join(', ');
if (!this.parent) return representation; if (!this.parent) return representation;

@ -87,7 +87,7 @@ $projects = (
"framework/src/Volo.Abp.EntityFrameworkCore", "framework/src/Volo.Abp.EntityFrameworkCore",
"framework/src/Volo.Abp.EntityFrameworkCore.MySQL", "framework/src/Volo.Abp.EntityFrameworkCore.MySQL",
# "framework/src/Volo.Abp.EntityFrameworkCore.Oracle", # "framework/src/Volo.Abp.EntityFrameworkCore.Oracle",
# "framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart", "framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart",
"framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql", "framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql",
"framework/src/Volo.Abp.EntityFrameworkCore.Sqlite", "framework/src/Volo.Abp.EntityFrameworkCore.Sqlite",
"framework/src/Volo.Abp.EntityFrameworkCore.SqlServer", "framework/src/Volo.Abp.EntityFrameworkCore.SqlServer",

Loading…
Cancel
Save