mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
28 lines
752 B
C#
28 lines
752 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.ComponentModel.DataAnnotations;
|
|||
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
|
using Microsoft.EntityFrameworkCore;
|
|||
|
|
|
|||
|
|
namespace Packt.Shared
|
|||
|
|
{
|
|||
|
|
public partial class CustomerDemographic
|
|||
|
|
{
|
|||
|
|
public CustomerDemographic()
|
|||
|
|
{
|
|||
|
|
Customers = new HashSet<Customer>();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[Key]
|
|||
|
|
[Column("CustomerTypeID")]
|
|||
|
|
[StringLength(10)]
|
|||
|
|
public string CustomerTypeId { get; set; } = null!;
|
|||
|
|
[Column(TypeName = "ntext")]
|
|||
|
|
public string? CustomerDesc { get; set; }
|
|||
|
|
|
|||
|
|
[ForeignKey("CustomerTypeId")]
|
|||
|
|
[InverseProperty("CustomerTypes")]
|
|||
|
|
public virtual ICollection<Customer> Customers { get; set; }
|
|||
|
|
}
|
|||
|
|
}
|