Advertisement
Guest User

Untitled

a guest
Mar 30th, 2018
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. public partial class City
  2.     {
  3.         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
  4.         public City()
  5.         {
  6.             this.Projects = new HashSet<Project>();
  7.         }
  8.    
  9.         public int Id { get; set; }
  10.         public string Name { get; set; }
  11.         [ForeignKey("Region")]
  12.         public Nullable<int> Region_Id { get; set; }
  13.    
  14.         public virtual Region Region { get; set; }
  15.         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
  16.         public virtual ICollection<Project> Projects { get; set; }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement