117
Приложение 2. Листинг программы
namespace WorkersTimes
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
public partial class Workers
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage",
"CA2214:DoNotCallOverridableMethodsInConstructors")]
public Workers()
{
Departments = new HashSet<Departments>();
Visits = new HashSet<Visits>();
Brigades = new HashSet<Brigades>();
Departments1 = new HashSet<Departments>();
}
[Key]
public int WorkerId { get; set; }
[StringLength(50)]
public string Name { get; set; }
[StringLength(50)]
public string Surname { get; set; }
[StringLength(50)]
public string Phone { get; set; }
[Column(TypeName = "money")]
public decimal? Salary { get; set; }
[StringLength(50)]
public string Address { get; set; }
[StringLength(50)]
public string Position { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage",
"CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<Departments> Departments { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage",
"CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<Visits> Visits { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage",
"CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<Brigades> Brigades { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage",
"CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<Departments> Departments1 { get; set; }
}
}
namespace WorkersTimes
{