Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9177519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:20:40+00:00 2026-06-17T17:20:40+00:00

I wasn’t exactly sure what to title this question, this is the problem I’m

  • 0

I wasn’t exactly sure what to title this question, this is the problem I’m trying to solve.

I have two tables with a many to many relationship between them, Fight and Fighter. A fighter can be in many fights, and a Fight has many fighters (2 fighters). These are mapped fine but what I want to do is have a column in the Fight table in which I can set who won the fight between the two fighters. What would be the best approach to this?

Thanks in advance, if you don’t understand I’ll try to explain it in a better way.

public class Fight
{
    [Key]
    public int FightId { get; set; }

    [Key, ForeignKey("FightCard")]
    public int CardId { get; set; }

    public virtual ICollection<Fighter> Fighters { get; set; }

    }

public class Fighter
{
    [Key]
    public int FighterID { get; set; }

    [Required]
    [DisplayName("First Name")]
    public string FirstName { get; set; }

    [Required]
    [DisplayName("Last Name")]
    public string LastName { get; set; }

    [DisplayName("Nickname")]
    public string NickName { get; set; }

    [Required]
    public string Nationality { get; set; }

    public static String[] WeightClassOptions
    {
        get
        {
            return new String[] { "Heavyweight", "Light Heavyweight", "Middleweight", "Welterweight", "Lightweight", "Featherweight", "Bantamweight", "Flyweight" };
        }
    }

    [DisplayName("Weight Class")]
    public string WeightClass { get; set; }

    public string Height { get; set; }

    [Required]
    [DisplayName("Date of Birth")]
    [DataType(DataType.Date)]
    public DateTime DateOfBirth { get; set; }

    // Fight Record:
    public int Wins { get; set; }
    public int Loss { get; set; }
    public int Draw { get; set; }
    public int NoContest { get; set; }

    public String Picture { get; set; }

    public virtual ICollection<Fight> Fight { get; set; }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:20:42+00:00Added an answer on June 17, 2026 at 5:20 pm

    You could create a one-to-many relationship from Fight to Fighter called Winner.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wasn't sure exactly how to phrase the question Title. I have this block
Wasn't too sure exactly how to title this question, but here's the issue that
I wasn't sure what to title this question. Here's my goal: On page one,
I wasn't sure how to word this exactly. But I have a model that
Wasn't sure how to write a good title for this question... :) I'm new
I wasn't even sure how to title this right. I have a page that
I wasn't sure how to title this question. I create a UDP connection using
I wasn't sure how to title this question. I'm creating an RIA Services driven
Wasn't sure how to title this, so please change it :) If I have
Wasn't sure how to title my question, but what I am trying to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.