diff --git a/ApiService/ApiService.csproj b/ApiService/ApiService.csproj
new file mode 100644
index 0000000..d12c450
--- /dev/null
+++ b/ApiService/ApiService.csproj
@@ -0,0 +1,8 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
diff --git a/ApiService/Controllers/WeatherForecastController.cs b/ApiService/Controllers/WeatherForecastController.cs
new file mode 100644
index 0000000..88605a3
--- /dev/null
+++ b/ApiService/Controllers/WeatherForecastController.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+
+namespace ApiService.Controllers
+{
+ [ApiController]
+ [Route("[controller]")]
+ public class WeatherForecastController : ControllerBase
+ {
+ private static readonly string[] Summaries = new[]
+ {
+ "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
+ };
+
+ private readonly ILogger _logger;
+
+ public WeatherForecastController(ILogger logger)
+ {
+ _logger = logger;
+ }
+
+ [HttpGet]
+ public IEnumerable Get()
+ {
+ var rng = new Random();
+ return Enumerable.Range(1, 5).Select(index => new WeatherForecast
+ {
+ Date = DateTime.Now.AddDays(index),
+ TemperatureC = rng.Next(-20, 55),
+ Summary = Summaries[rng.Next(Summaries.Length)]
+ })
+ .ToArray();
+ }
+ }
+}
diff --git a/ApiService/Program.cs b/ApiService/Program.cs
new file mode 100644
index 0000000..2dbd907
--- /dev/null
+++ b/ApiService/Program.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+
+namespace ApiService
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ CreateHostBuilder(args).Build().Run();
+ }
+
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup();
+ });
+ }
+}
diff --git a/ApiService/Properties/launchSettings.json b/ApiService/Properties/launchSettings.json
new file mode 100644
index 0000000..b5d60ea
--- /dev/null
+++ b/ApiService/Properties/launchSettings.json
@@ -0,0 +1,30 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:56143",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "weatherforecast",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "ApiService": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "launchUrl": "weatherforecast",
+ "applicationUrl": "http://localhost:5000",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/ApiService/Startup.cs b/ApiService/Startup.cs
new file mode 100644
index 0000000..0b6f12a
--- /dev/null
+++ b/ApiService/Startup.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+
+namespace ApiService
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddControllers();
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+ {
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+
+ app.UseRouting();
+
+ app.UseAuthorization();
+
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapControllers();
+ });
+ }
+ }
+}
diff --git a/ApiService/WeatherForecast.cs b/ApiService/WeatherForecast.cs
new file mode 100644
index 0000000..58a71f3
--- /dev/null
+++ b/ApiService/WeatherForecast.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace ApiService
+{
+ public class WeatherForecast
+ {
+ public DateTime Date { get; set; }
+
+ public int TemperatureC { get; set; }
+
+ public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
+
+ public string Summary { get; set; }
+ }
+}
diff --git a/ApiService/appsettings.Development.json b/ApiService/appsettings.Development.json
new file mode 100644
index 0000000..8983e0f
--- /dev/null
+++ b/ApiService/appsettings.Development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ }
+}
diff --git a/ApiService/appsettings.json b/ApiService/appsettings.json
new file mode 100644
index 0000000..d9d9a9b
--- /dev/null
+++ b/ApiService/appsettings.json
@@ -0,0 +1,10 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/ServicesCallsService.sln b/ServicesCallsService.sln
index 06586c1..c97b6f2 100644
--- a/ServicesCallsService.sln
+++ b/ServicesCallsService.sln
@@ -3,7 +3,25 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30611.23
MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebMVC", "WebMVC\WebMVC.csproj", "{FDAFEB96-62CA-46ED-8DC5-0D15F13CBF1B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiService", "ApiService\ApiService.csproj", "{381379E2-15DC-4835-A260-7B1E52ADE46D}"
+EndProject
Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FDAFEB96-62CA-46ED-8DC5-0D15F13CBF1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FDAFEB96-62CA-46ED-8DC5-0D15F13CBF1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FDAFEB96-62CA-46ED-8DC5-0D15F13CBF1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FDAFEB96-62CA-46ED-8DC5-0D15F13CBF1B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {381379E2-15DC-4835-A260-7B1E52ADE46D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {381379E2-15DC-4835-A260-7B1E52ADE46D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {381379E2-15DC-4835-A260-7B1E52ADE46D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {381379E2-15DC-4835-A260-7B1E52ADE46D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection