You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
EntityFrameworkCore.Jet/test/EFCore.Jet.CustomBaseTests/GearsOfWarModel/Gear.cs

46 lines
1.1 KiB
C#

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace EFCore.Jet.CustomBaseTests.GearsOfWarModel;
public class Gear
{
public Gear()
{
Weapons = new List<Weapon>();
}
// composite key
public string Nickname { get; set; }
public int SquadId { get; set; }
public string FullName { get; set; }
public string CityOfBirthName { get; set; }
public virtual City CityOfBirth { get; set; }
public virtual City AssignedCity { get; set; }
public MilitaryRank Rank { get; set; }
public virtual CogTag Tag { get; set; } = new(); // Initialized to test #23851
public virtual Squad Squad { get; set; }
// TODO: make this many to many - not supported at the moment
public virtual ICollection<Weapon> Weapons { get; set; }
public string LeaderNickname { get; set; }
public int? LeaderSquadId { get; set; }
public bool HasSoulPatch { get; set; }
[NotMapped]
public bool IsMarcus
=> Nickname == "Marcus";
}