-1

I have 2 tables which are builds and accounts. Each user can have more than 1 builds but builds can have only one account. I can see the build owner on the mysql workbench but I can't see the builds of the account. Is there any way to solve this?

    public class AccountModel
{
    public Guid ID { get; set; }
    public string Username { get; set; }
    public int Password { get; set; }
    public ICollection<BuildModel> builds { get; set; }
}

and:

    public class BuildModel 
{
    public Guid ID { get; set; }
    public int Damage { get; set; }
    public string WeaponName { get; set; }
    public AccountModel ownerOfTheBuild { get; set; }

}

enter image description here

enter image description here

Edit: Forgot to mention that I can access the builds data via the coding, just can't see on the workbench.

Shadow
  • 33,525
  • 10
  • 51
  • 64
yekoba
  • 13
  • 4
  • 1
    The builds of the accounts are implicitly given by the ownerOfTheBuildIDs on the build table. to see the builds of a specific account you would have to issue a select statement with a where clause that searches for a specific account id. – MatterOfFact Aug 03 '23 at 16:04
  • I don't know how to do that. Could you give an example? – yekoba Aug 03 '23 at 17:11

0 Answers0