-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployee.vb
37 lines (28 loc) · 1.03 KB
/
Employee.vb
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
30
31
32
33
34
35
36
37
Imports System.Collections.Generic
Imports System.ComponentModel.DataAnnotations
Imports System.ComponentModel.DataAnnotations.Schema
Namespace CustomDrawCrosshairSample.Model
Public Partial Class Employee
<System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")>
Public Sub New()
Orders = New HashSet(Of Order)()
End Sub
<Key>
<Column("EmployeeId")>
Public Property EmployeeId As Integer
<Required>
<StringLength(20)>
Public Property LastName As String
<Required>
<StringLength(10)>
Public Property FirstName As String
<Column(TypeName:="image")>
Public Property Photo As Byte()
Public ReadOnly Property FullName As String
Get
Return String.Format("{0} {1}", FirstName, LastName)
End Get
End Property
Public Overridable Property Orders As ICollection(Of Order)
End Class
End Namespace