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
services.AddHttpClient<IDiscountService, DiscountService>(c => | |
c.BaseAddress = new Uri(Configuration["ApiConfigs:Discount:Uri"])) | |
.AddPolicyHandler(GetRetryPolicy()) | |
.AddPolicyHandler(GetCircuitBreakerPolicy()); |
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 BookMyEvent.Services.ShoppingCart.DTOs; | |
using BookMyEvent.Services.ShoppingCart.Extensions; | |
using System; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace BookMyEvent.Services.ShoppingCart.Services | |
{ | |
public class DiscountService : IDiscountService | |
{ |
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
services.AddHttpClient<IDiscountService, DiscountService>(c => | |
c.BaseAddress = new Uri(Configuration["ApiConfigs:Discount:Uri"])) |
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.Collections.Generic; | |
using System.Threading.Tasks; | |
using MediatR; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
using Movies.Application.Commands; | |
using Movies.Application.Queries; | |
using Movies.Application.Responses; | |
namespace Movies.API.Controllers |
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.Threading.Tasks; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; | |
using Movies.Infrastructure.Data; | |
namespace Movies.API | |
{ |
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 Microsoft.AspNetCore.Mvc; | |
namespace Movies.API.Controllers | |
{ | |
[ApiVersion("1")] | |
[Route("api/v{version:apiVersion}/[controller]")] | |
[ApiController] | |
public class ApiController : ControllerBase | |
{ | |
} |
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
{ | |
"ConnectionStrings": { | |
"MovieConnection": "Server=localhost,1445;Database=MovieDb;User Id=sa;Password=Docker@1;" | |
}, | |
"Logging": { | |
"LogLevel": { | |
"Default": "Information", | |
"Microsoft": "Warning", | |
"Microsoft.Hosting.Lifetime": "Information" | |
} |
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.Reflection; | |
using AutoMapper; | |
using MediatR; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.OpenApi.Models; |
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
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp3.1</TargetFramework> | |
<UserSecretsId>e88f5ae1-7d07-45aa-b82e-680c50af1d19</UserSecretsId> | |
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.0.1" /> |
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.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MediatR; | |
using Movies.Application.Mappers; | |
using Movies.Application.Queries; | |
using Movies.Application.Responses; | |
using Movies.Core.Repositories; | |
namespace Movies.Application.Handlers |