forked from zzzprojects/System.Linq.Dynamic.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.cs
More file actions
42 lines (26 loc) · 1.12 KB
/
Employee.cs
File metadata and controls
42 lines (26 loc) · 1.12 KB
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
38
39
40
41
42
using System.ComponentModel.DataAnnotations.Schema;
using Linq.PropertyTranslator.Core;
namespace System.Linq.Dynamic.Core.Tests.Entities
{
public class Employee : Entity
{
private static readonly CompiledExpressionMap<Employee, string> FullNameExpr =
DefaultTranslationOf<Employee>.Property(e => e.FullName).Is(e => e.FirstName + " " + e.LastName);
public int EmployeeNumber { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public DateTime HireDate { get; set; }
public long? CompanyId { get; set; }
public long? CountryId { get; set; }
public long? FunctionId { get; set; }
public long? SubFunctionId { get; set; }
public Company Company { get; set; }
public Country Country { get; set; }
public Function Function { get; set; }
public SubFunction SubFunction { get; set; }
public int? Assigned { get; set; }
[NotMapped]
public string FullName => FullNameExpr.Evaluate(this);
}
}