mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 09:17:47 +00:00
update match scores
This commit is contained in:
25
Core/FeedGenerator.cs
Normal file
25
Core/FeedGenerator.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LiveGameFeed.Models;
|
||||
|
||||
namespace LiveGameFeed.Core
|
||||
{
|
||||
public class FeedGenarator
|
||||
{
|
||||
public static Feed UpdateScore(Match match) {
|
||||
Feed feed = new Feed();
|
||||
feed.MatchId = match.Id;
|
||||
|
||||
if(match.Type == MatchTypeEnums.Football)
|
||||
{
|
||||
|
||||
}
|
||||
else if (match.Type == MatchTypeEnums.Basketball)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return feed;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,8 @@ namespace LiveGameFeed.Core.Mappings
|
||||
{
|
||||
protected override void Configure()
|
||||
{
|
||||
Mapper.CreateMap<Match, MatchViewModel>();
|
||||
Mapper.CreateMap<Match, MatchViewModel>()
|
||||
.ForMember(m => m.Type, map => map.MapFrom(m => m.Type.ToString()));
|
||||
Mapper.CreateMap<Feed, FeedViewModel>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user