﻿using FluentNHibernate.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Orm.OneToOne
{
    public class ParentMap : ClassMap<Parent>
    {
        public ParentMap()
        {
            Table("Parents");
            Id(x => x.Id).GeneratedBy.Identity();

            Map(x => x.Nombre);

            HasOne(x => x.Child).PropertyRef(x => x.Parent);
        }
    }
}
