mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 17:27:48 +00:00
rename match leauge to type
This commit is contained in:
@@ -25,7 +25,7 @@ namespace ChatLe.Controllers
|
|||||||
{
|
{
|
||||||
TimerEventArgs eventsArgs = e as TimerEventArgs;
|
TimerEventArgs eventsArgs = e as TimerEventArgs;
|
||||||
System.Diagnostics.Debug.WriteLine("hello from home ApiHubController.cs..");
|
System.Diagnostics.Debug.WriteLine("hello from home ApiHubController.cs..");
|
||||||
await Clients.All.userConnected(DateTime.Now);
|
//await Clients.All.userConnected(DateTime.Now);
|
||||||
//_coolMessageHubContext.Clients.All.newCpuValue(eventsArgs.Value);
|
//_coolMessageHubContext.Clients.All.newCpuValue(eventsArgs.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,48 +24,57 @@ namespace LiveGameFeed.Data
|
|||||||
{
|
{
|
||||||
Host = "Team 1",
|
Host = "Team 1",
|
||||||
Guest = "Team 2",
|
Guest = "Team 2",
|
||||||
HostScore = 3,
|
HostScore = 0,
|
||||||
GuestScore = 1,
|
GuestScore = 0,
|
||||||
MatchDate = DateTime.Now,
|
MatchDate = DateTime.Now,
|
||||||
League = "FootballLeauge",
|
Type = "Football",
|
||||||
Feeds = new List<Feed>
|
Feeds = new List<Feed>
|
||||||
{
|
{
|
||||||
new Feed()
|
new Feed()
|
||||||
{
|
{
|
||||||
Description = "Match started",
|
Description = "Match started",
|
||||||
MatchId = 1
|
MatchId = 1
|
||||||
},
|
}
|
||||||
new Feed()
|
|
||||||
{
|
|
||||||
Description = "Goal for Panathinaikos",
|
|
||||||
MatchId = 1
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Match match_02 = new Match
|
Match match_02 = new Match
|
||||||
{
|
{
|
||||||
Host = "Team 3",
|
Host = "Team 3",
|
||||||
Guest = "Team 4",
|
Guest = "Team 4",
|
||||||
HostScore = 5,
|
HostScore = 0,
|
||||||
GuestScore = 3,
|
GuestScore = 0,
|
||||||
MatchDate = DateTime.Now,
|
MatchDate = DateTime.Now,
|
||||||
League = "Spanish League",
|
Type = "Football",
|
||||||
Feeds = new List<Feed>
|
Feeds = new List<Feed>
|
||||||
{
|
{
|
||||||
new Feed()
|
new Feed()
|
||||||
{
|
{
|
||||||
Description = "Match started",
|
Description = "Match started",
|
||||||
MatchId = 2
|
MatchId = 2
|
||||||
},
|
}
|
||||||
new Feed()
|
|
||||||
{
|
|
||||||
Description = "Goal for Real Madrid",
|
|
||||||
MatchId = 2
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
context.Matches.Add(match_01); context.Matches.Add(match_02);
|
Match match_03 = new Match
|
||||||
|
{
|
||||||
|
Host = "Team 5",
|
||||||
|
Guest = "Team 6",
|
||||||
|
HostScore = 0,
|
||||||
|
GuestScore = 0,
|
||||||
|
MatchDate = DateTime.Now,
|
||||||
|
Type = "Basketball",
|
||||||
|
Feeds = new List<Feed>
|
||||||
|
{
|
||||||
|
new Feed()
|
||||||
|
{
|
||||||
|
Description = "Match started",
|
||||||
|
MatchId = 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
context.Matches.Add(match_01); context.Matches.Add(match_02); context.Matches.Add(match_03);
|
||||||
|
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace LiveGameFeed.Models
|
|||||||
public int HostScore { get; set; }
|
public int HostScore { get; set; }
|
||||||
public int GuestScore { get; set; }
|
public int GuestScore { get; set; }
|
||||||
public DateTime MatchDate { get; set; }
|
public DateTime MatchDate { get; set; }
|
||||||
public string League { get; set; }
|
public string Type { get; set; }
|
||||||
|
|
||||||
public ICollection<Feed> Feeds { get; set; }
|
public ICollection<Feed> Feeds { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace LiveGameFeed.Models
|
namespace LiveGameFeed.Models
|
||||||
{
|
{
|
||||||
@@ -11,6 +10,6 @@ namespace LiveGameFeed.Models
|
|||||||
public int HostScore { get; set; }
|
public int HostScore { get; set; }
|
||||||
public int GuestScore { get; set; }
|
public int GuestScore { get; set; }
|
||||||
public DateTime MatchDate { get; set; }
|
public DateTime MatchDate { get; set; }
|
||||||
public string League { get; set; }
|
public string Type { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-6 col-md-4" *ngFor="let match of matches">
|
<div class="col-md-4" *ngFor="let match of matches">
|
||||||
<match [match]="match"></match>
|
<match [match]="match"></match>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -15,8 +15,11 @@
|
|||||||
<td><span class="teamScore">{{match.guestScore}}</span></td>
|
<td><span class="teamScore">{{match.guestScore}}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td>
|
||||||
<button type="button" class="btn btn-default btn-lg btn-block">
|
<span class="label label-success">{{match.type}}</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="btn btn-default btn-xs">
|
||||||
Subscribe to feed
|
Subscribe to feed
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ export interface Match {
|
|||||||
hostScore: number;
|
hostScore: number;
|
||||||
guestScore: number;
|
guestScore: number;
|
||||||
matchDate: Date;
|
matchDate: Date;
|
||||||
league: string;
|
type: string;
|
||||||
feeds: any
|
feeds: any
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user