forked from markjprice/web-dev-net9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTerritory.cs
29 lines (23 loc) · 802 Bytes
/
Territory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Northwind.EntityModels;
public partial class Territory
{
[Key]
[Column("TerritoryID")]
[StringLength(20)]
public string TerritoryId { get; set; } = null!;
[StringLength(50)]
public string TerritoryDescription { get; set; } = null!;
[Column("RegionID")]
public int RegionId { get; set; }
[ForeignKey("RegionId")]
[InverseProperty("Territories")]
public virtual Region Region { get; set; } = null!;
[ForeignKey("TerritoryId")]
[InverseProperty("Territories")]
public virtual ICollection<Employee> Employees { get; set; } = new List<Employee>();
}