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 / Add a new microservice project.md
Last active June 17, 2021 09:15
How to add a new microservice to your ABP microservice solution?

This is a GitHub changeset that shows how to add a new microservice to your ABP Commercial microservice solution. I'll add a new microservice called OrderService to a new microservice solution.

First of all, there's an official document guiding these steps:

https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice

Create a new microservice project in your solution:

Run the following command in the root directory of your solution where your main .sln file exists.

@ebicoglu
ebicoglu / Default.cshtml
Last active July 20, 2021 01:59
Customizing ABP Commercial register page (MVC)
@using Microsoft.Extensions.Localization
@using Microsoft.Extensions.Options
@using Volo.Abp.AspNetCore.MultiTenancy
@using Volo.Abp.AspNetCore.Mvc.AntiForgery
@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Bundling
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Themes.Lepton.Components.Content.Alerts
@using Volo.Abp.Ui.Branding
@ebicoglu
ebicoglu / BookStoreTenantDatabaseMigrationHandler.cs
Last active February 2, 2023 19:17
New migration handler that came in v4.3.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
@ebicoglu
ebicoglu / update-abp-cli-tools-preview.ps1
Last active April 2, 2021 07:37
Updates ABP CLI and ABP Suite to the latest version (including previews)
Set-PSDebug -Trace 0
$packageName = "volo.abp.cli"
$output = dotnet tool search $packageName --prerelease --take 1
$outputString = ("" + $output)
$indexOfVersionLine = $outputString.IndexOf($packageName)
$latestVersion = $outputString.substring($indexOfVersionLine + $packageName.length).trim().split(" ")[0].trim()
Write-Host "Updating "$packageName" to" $latestVersion
@ebicoglu
ebicoglu / Module Structure.md
Created March 16, 2021 12:22
Project descriptions

image

@ebicoglu
ebicoglu / INotificationClient.cs
Last active March 29, 2021 14:55
SignalR Notification
using System.Threading.Tasks;
public interface INotificationClient
{
Task ReceiveNotificationMessage(string message);
}
@ebicoglu
ebicoglu / AbpAspNetCoreMvcUiThemeCommercialModule.cs
Last active February 12, 2021 09:58
Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial Project
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial
{
[DependsOn(
@ebicoglu
ebicoglu / abp-docker.yaml
Last active April 14, 2021 09:16
ABP licensing in a Docker Container
#FROM mcr.microsoft.com/dotnet/sdk:5.0-focal
#ENV DOTNET_USE_POLLING_FILE_WATCHER 1
#WORKDIR /app/src/product-service/Volosoft.MyMicroserviceSystem.ProductService.HttpApi.Host
#RUN dotnet tool install -g dotnet-serve
#ENV PATH="${PATH}:/root/.dotnet/tools"
#RUN dotnet tool install --global Volo.Abp.Cli
#RUN abp login "user@sample.com" -p "12345"
#ENTRYPOINT [ "dotnet", "watch", "run", "--urls", "https://0.0.0.0:6001/" ]
@ebicoglu
ebicoglu / AppUser.cs
Created January 22, 2021 11:52
AppUser
public class AppUser : FullAuditedAggregateRoot<Guid>, IUser
{
#region Base properties
/* These properties are shared with the IdentityUser entity of the Identity module.
* Do not change these properties through this class. Instead, use Identity module
* services (like IdentityUserManager) to change them.
* So, this properties are designed as read only!
*/
@ebicoglu
ebicoglu / YourProject.Blazor_Dockerfile
Last active December 22, 2020 18:35
Containerize Blazor with Docker + nginx
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS builder
WORKDIR /app
COPY . .
RUN dotnet publish -c Release src/YourProject.Blazor -o /app/publish
FROM nginx:alpine
COPY --from=builder /app/publish/wwwroot /usr/share/nginx/html/