There are 2 packages for ABP Oracle integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
OBJECT_NAME(id.[object_id], db.[database_id]) AS [Table] | |
,id.[equality_columns] AS [EqualityColumns] | |
,id.[inequality_columns] AS [InEqualityColumns] | |
,id.[included_columns] AS [IncludedColumns] | |
,gs.[avg_total_user_cost] AS [UserCost] -- Average cost of the user queries that could be reduced by the index in the group. | |
,gs.[avg_user_impact] AS [QueryBoostImpact] -- The value means that the query cost would on average drop by this percentage if this missing index group was implemented. | |
,gs.[user_seeks] * gs.[avg_total_user_cost] * (gs.[avg_user_impact] * 0.01) AS [IndexAdvantage] | |
,'CREATE INDEX [IX_' + OBJECT_NAME(id.[object_id], db.[database_id]) + '_' + REPLACE(REPLACE(REPLACE(ISNULL(id.[equality_columns], ''), ', ', '_'), '[', ''), ']', '') + CASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyDbContext : DbContext | |
{ | |
public DbSet<User> Users { get; set; } | |
public MyDbContext(DbContextOptions<MyDbContext> options) | |
: base(options) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Define your own session and add your custom field to it | |
//Then, you can inject MyAppSession and use it's new property in your project. | |
public class MyAppSession : ClaimsAbpSession, ITransientDependency | |
{ | |
public MyAppSession( | |
IPrincipalAccessor principalAccessor, | |
IMultiTenancyConfig multiTenancy, | |
ITenantResolver tenantResolver, | |
IAmbientScopeProvider<SessionOverride> sessionOverrideScopeProvider) : | |
base(principalAccessor, multiTenancy, tenantResolver, sessionOverrideScopeProvider) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Abp.Runtime.Session; | |
namespace Abp.Temp | |
{ | |
public static class AbpSessionExtensions | |
{ | |
public static IDisposable Override(this IAbpSession abpSession, int? tenantId, long? userId) | |
{ | |
var overridableSession = abpSession as OverridableSession; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
namespace AbpWebSite.Templates | |
{ | |
/// <summary> | |
/// Used to rename a solution | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add new property to claims on login | |
private async Task SignInAsync(User user, ClaimsIdentity identity = null, bool rememberMe = false) | |
{ | |
if (identity == null) | |
{ | |
identity = await _userManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie); | |
} | |
identity.AddClaim(new Claim("Application_UserEmail", user.EmailAddress)); //SETTING NEW PROPERTY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async static Task<T> ThrowsAsync<T>(Func<Task> testCode) where T : Exception | |
{ | |
try | |
{ | |
await testCode(); | |
Assert.Throws<T>(() => { }); // Use xUnit's default behavior. | |
} | |
catch (T exception) | |
{ | |
return exception; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using NUnit.Framework; | |
namespace MyProject | |
{ | |
[TestFixture] |