added timer service to home controller

This commit is contained in:
chsakell
2016-09-30 11:32:27 +03:00
parent 63866a2746
commit 1f14c0c55f
10 changed files with 94 additions and 14 deletions

View File

@@ -11,7 +11,8 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using LiveGameFeed.Mappings;
using LiveGameFeed.Core.Mappings;
using LiveGameFeed.Core.MvcTimer;
namespace LiveGameFeed
{
@@ -38,6 +39,10 @@ namespace LiveGameFeed
services.AddScoped<IMatchRepository, MatchRepository>();
services.AddScoped<IFeedRepository, FeedRepository>();
// Timer service configuration
services.AddSingleton<ITimerService, TimerService>();
services.Configure<TimerServiceConfiguration>(Configuration.GetSection("TimeService"));
// Automapper Configuration
AutoMapperConfiguration.Configure();