using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.Spatial; using System.Data.Entity.Infrastructure; using System.Linq; using System.Web; using System.Data.Entity; using OSS.Models; namespace OSS.Models { public class District { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long DistrictID { get; set; } [Required] public string RegionCode { get; set; } [Required] public string DistrictName { get; set; } [Key] public string DistrictCode { get; set; } public string RegionName { get; set; } [ForeignKey("RegionCode")] public virtual Region Regions { get; set; } } }