Skip to content

Instantly share code, notes, and snippets.

View ismcagdas's full-sized avatar

İsmail ÇAĞDAŞ ismcagdas

  • Volosoft
  • Istanbul, Turkey
View GitHub Profile
@ismcagdas
ismcagdas / angular-cli.json
Created January 29, 2018 13:00
Acme.HeroShop - angular-cli.json
{
"platform": "server",
"root": "HeroApp/src",
"outDir": "HeroApp/dist-server",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.server.ts",
@ismcagdas
ismcagdas / HomeController.cs
Last active January 29, 2018 13:17
Acme.HeroShop - HomeController.cs - 2
public class HomeController : Controller
{
private readonly IHostingEnvironment _hostingEnvironment;
public HomeController(IHostingEnvironment hostingEnvironment)
{
_hostingEnvironment = hostingEnvironment;
}
[HttpGet]
public async Task<IActionResult> Index()
@ismcagdas
ismcagdas / HeroAppService.cs
Created January 29, 2018 19:47
Acme.HeroShop - HeroAppService.cs
public class HeroAppService : HeroShopAppServiceBase, IHeroAppService
{
private readonly IRepository<Hero> _heroRepository;
private readonly IRepository<HeroCompany> _heroCompanyRepository;
public HeroAppService(
IRepository<Hero> heroRepository,
IRepository<HeroCompany> heroCompanyRepository)
{
_heroRepository = heroRepository;
@ismcagdas
ismcagdas / app.component.ts
Created January 30, 2018 10:21
Acme.HeroShop - app.component.ts - 3
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'app';
heroCompanies: any = [];
@ismcagdas
ismcagdas / app.component.html
Created January 30, 2018 10:23
Acme.HeroShop - app.component.html - 3
<header>
<div class="navbar navbar-dark bg-dark box-shadow">
<div class="container d-flex justify-content-between">
<a href="#" class="navbar-brand d-flex align-items-center">
<strong>Acme.HeroShop</strong>
</a>
</div>
</div>
</header>
@ismcagdas
ismcagdas / Startup.cs
Created January 30, 2018 12:07
Acme.HeroShop - Startup.cs - 3
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddNodeServices();
return services.AddAbp<HeroShopPublicModule>();
}
@ismcagdas
ismcagdas / appsettings.json
Created January 30, 2018 12:12
Acme.HeroShop - appsettings.json
{
"ConnectionStrings": {
"Default": "Server=localhost; Database=HeroShopDb; Trusted_Connection=True;"
},
"Authentication": {
"JwtBearer": {
"IsEnabled": "false",
"SecurityKey": "HeroShop_C421AAEE0D114E9C",
"Issuer": "HeroShop",
"Audience": "HeroShop"
@ismcagdas
ismcagdas / app.component.ts
Created January 30, 2018 13:01
Acme.HeroShop - app.component.ts - 4
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
heroCompanies: any = [];
@ismcagdas
ismcagdas / app.component.html
Created January 30, 2018 13:02
Acme.HeroShop - app.component.html - 4
<header>
<div class="navbar navbar-dark bg-dark box-shadow">
<div class="container d-flex justify-content-between">
<a href="#" class="navbar-brand d-flex align-items-center">
<strong>Acme.HeroShop</strong>
</a>
</div>
</div>
</header>
@ismcagdas
ismcagdas / InitialHeroBuilder.cs
Created January 30, 2018 20:19
Acme.HeroShop - InitialHeroBuilder.cs
public class InitialHeroBuilder
{
private readonly HeroShopDbContext _context;
public InitialHeroBuilder(HeroShopDbContext context)
{
_context = context;
}
public void Create()