added Data, Models, EntityFramework

This commit is contained in:
chsakell
2016-09-28 13:21:28 +03:00
parent 1ef3f04731
commit e6aed79fa9
17 changed files with 378 additions and 28 deletions

13
Models/Feed.cs Normal file
View File

@@ -0,0 +1,13 @@
using System;
namespace LiveGameFeed.Models
{
public class Feed : IEntityBase
{
public int Id { get; set; }
public string Description { get; set; }
public DateTime CreatedAt { get; set; }
public int MatchId { get; set; }
public Match Match { get; set; }
}
}

12
Models/IEntityBase.cs Normal file
View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LiveGameFeed.Models
{
public interface IEntityBase
{
int Id { get; set; }
}
}

22
Models/Match.cs Normal file
View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
namespace LiveGameFeed.Models
{
public class Match : IEntityBase
{
public Match()
{
Feeds = new List<Feed>();
}
public int Id { get; set; }
public string Host { get; set; }
public string Guest { get; set; }
public int HostScore { get; set; }
public int GuestScore { get; set; }
public DateTime MatchDate { get; set; }
public string League { get; set; }
public ICollection<Feed> Feeds { get; set; }
}
}