Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using SportsService.Data;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace SportsService.Models
- {
- public class Club
- {
- public int ID { get; set; }
- public byte[] Logo { get; set; }
- public string Name { get; set; }
- public DateTime Established { get; set; }
- public int PlayedMatches { get; set; }
- public int Wins { get; set; }
- public int Loss { get; set; }
- public int Draw { get; set; }
- public int GoalsConceived { get; set; }
- public int GoalsScored { get; set; }
- public int Points { get; set; }
- public int LeaguePosition { get; set; }
- public int CoachID { get; set; }
- public int StadiumID { get; set; }
- public int DivisionID { get; set; }
- public string History { get; set; }
- public int TitlesWon { get; set; }
- public string TitlesWonYears { get; set; }
- public int CupsWon { get; set; }
- public string CupsWonYears { get; set; }
- public int ChampionsLeaguesWon { get; set; }
- public string ChampionsLeaguesWonYears { get; set; }
- public int EuropaLeaguesWon { get; set; }
- public string EuropaLeaguesWonYears { get; set; }
- public virtual Coach Coach{ get; set; }
- public virtual Division Division { get; set; }
- public virtual Stadium Stadium { get; set; }
- public virtual ICollection<Player> Players { get; set; }
- }
- public class Coach
- {
- public int ID { get; set; }
- public int ClubID { get; set; }
- public int CountryID { get; set; }
- public byte[] ProfileImage { get; set; }
- public string Name { get; set; }
- public int Age { get; set; }
- public DateTime DateOfBirth { get; set; }
- public string Nationality { get; set; }
- public string Bio { get; set; }
- public virtual Club Club { get; set; }
- public virtual Country Country { get; set; }
- }
- public class ItemsDbContext : DbContext
- {
- public ItemsDbContext()
- : base("ItemsConnection")
- { }
- public DbSet<Club> Clubs { get; set; }
- public DbSet<Coach> Coaches { get; set; }
- public DbSet<Player> Players { get; set; }
- public DbSet<Division> Divisions { get; set; }
- public DbSet<GamePlayed> Matches { get; set; }
- public DbSet<News> News { get; set; }
- protected override void OnModelCreating(DbModelBuilder modelBuilder)
- {
- //modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement