praktikum4/Domain/Person.cs

34 lines
834 B
C#
Raw Normal View History

2017-03-01 17:20:40 +02:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2017-03-08 15:47:46 +02:00
using Domain.Enums;
2017-03-01 17:20:40 +02:00
namespace Domain
{
public class Person
{
public int PersonId { get; set; }
[MaxLength(128)]
[MinLength(1)]
[Required]
public string FirstName { get; set; }
[MaxLength(128)]
[MinLength(1)]
[Required]
public string LastName { get; set; }
2017-03-08 15:47:46 +02:00
public PersonType PersonType { get; set; }
public virtual List<PersonCources> Courses { get; set; } = new List<PersonCources>();
2017-03-08 14:38:36 +02:00
2017-03-01 17:20:40 +02:00
#region NotMaped
public string FirstLastName => $"{FirstName} {LastName}";
public string LastFirstName => $"{LastName} {FirstName}";
#endregion
}
}