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

namespace Domain
{
    public class Author
    {
        public int AuthorId { get; set; }

        [MaxLength(128)]
        public string FirstName { get; set; }
        [MaxLength(128)]
        public string LastName { get; set; }

        public virtual ICollection<Book> Books { get; set; }


        [NotMapped]
        public string FirstLastName
        {
            get
            {
                return FirstName + " " + LastName;
            }
        }

        [NotMapped]
        public string LastFirstName
        {
            get
            {
                return LastName + " " + FirstName;
            }
        }
    }
}
