Skip to content

Instantly share code, notes, and snippets.

View ebicoglu's full-sized avatar
:octocat:
Full stack developer

Alper Ebiçoğlu ebicoglu

:octocat:
Full stack developer
View GitHub Profile
@ebicoglu
ebicoglu / BookStoreDomainModule.cs
Last active May 11, 2020 10:39
How to show entity change history on a new entity in ABP MVC?
public override void ConfigureServices(ServiceConfigurationContext context)
{
//...
Configure<AbpAuditingOptions>(options =>
{
options.EntityHistorySelectors.AddAllEntities();
});
}
@ebicoglu
ebicoglu / abp-oracle-integration.md
Last active November 16, 2021 11:25
Integration guide to use Oracle with ABP Framework
@ebicoglu
ebicoglu / EfCoreSequentialNumberRepository.cs
Created May 29, 2020 06:57
Creating Sequential Numbers
public class EfCoreSequentialNumberRepository : EfCoreRepository<IQaDbContext, SequentialNumber, Guid>, ISequentialNumberRepository
{
public EfCoreSequentialNumberRepository(IDbContextProvider<IQaDbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public virtual SequentialNumber FindBySequenceName(string sequenceName)
{
@ebicoglu
ebicoglu / override-login-page.md
Created June 17, 2020 19:41
Customizing ABP commercial login page

Create a new Login.cshtml under Pages\Account folder

Login.cshtml

@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.Account.Localization
@model Acme.BookStore.Pages.Account.CustomLoginModel
@inject IHtmlLocalizer<AccountResource> L
var abp = abp || {};
$(function () {
abp.modals.apiResourceUpdate = function () {
var initModal = function (publicApi, args) {
var l = abp.localization.getResource('AbpIdentityServer');
var $form = publicApi.getForm();
var getUniqueId = function () {
@ebicoglu
ebicoglu / sql-find-missing-index.sql
Created August 11, 2020 10:09
Finds missing indexes for SQL
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
@ebicoglu
ebicoglu / manul-test-checklist.md
Last active September 13, 2020 21:55
Manual test checklist

ABP Manual Checklist

Create the template assigned to you. Visit all the pages, check the functionalities. Warning: For production testing, don't use preview parameter. Create issues for your feedbacks in the relevant repos (abp or volo).

To update your CLI tools, run the following commands:

dotnet tool update -g Volo.Abp.Cli

How to add a new language to your ABP project?

Adding a new language to your ABP project is pretty simple. Let's add the German language to our ABP project:

  1. Go to your solution's root folder and write the following CLI command. This command will generate an empty translation file from English.

abp translate -c de-DE

@ebicoglu
ebicoglu / command-prompt.reg
Last active November 24, 2024 23:20
Useful developer Windows right click items (context menu)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Command Prompt *]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Command Prompt *\command]
@="cmd.exe /s /k pushd \"%V\""
@ebicoglu
ebicoglu / identity-server-config.md
Created December 22, 2020 18:20
Identity Server endpoints configuration for prod environment

These tables should be configured for prod environment. Also appsettings.json should be configured.

SELECT ClientId, PostLogoutRedirectUri FROM  IdentityServerClientPostLogoutRedirectUris

SELECT ClientId, RedirectUri FROM  IdentityServerClientRedirectUris

SELECT Id, ClientId, FrontChannelLogoutUri FROM  IdentityServerClients