using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain
{
    public class Person
    {
        public int PersonID { get; set; }
        [Required]
        [MaxLength(128)]
        [MinLength(1)]
        [DisplayName("First name")]
        public String FirstName { get; set; }
        [Required]
        [MaxLength(128)]
        [MinLength(1)]
        [DisplayName("Last name")]
        public String LastName { get; set; }
        public virtual List<Contact> Contacts { get; set; }

        [NotMapped]
        [DisplayName("Persons name")]
        public String FirstLastName
        {
            get { return FirstName + " " + LastName; }
        }
        [NotMapped]
        [DisplayName("Persons name")]
        public String LastFirstName
        {
            get { return LastName + " " + FirstName; }
        }
    }

}
