blob: c57ef854498bb269ecd25b6ee1c26305059c1ed8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using FluentNHibernate.Mapping;
using Gestor.Infrastructure.Entities.Generic;
using Gestor.Infrastructure.Entities.Seguros;
using System;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
namespace Gestor.Infrastructure.Mappings.Seguros
{
public class ClienteVinculoMap : ClassMap<ClienteVinculoDb>
{
public ClienteVinculoMap()
{
base.Table("clivinculo");
base.LazyLoad();
base.Id((ClienteVinculoDb x) => (object)x.Id).GeneratedBy.Identity().Column("idvinculo");
base.References<ClienteDb>((ClienteVinculoDb x) => x.Cliente1).Column("idcliente1").Fetch.Join();
base.References<ClienteDb>((ClienteVinculoDb x) => x.Cliente2).Column("idcliente2").Fetch.Join();
base.Map((ClienteVinculoDb x) => (object)x.Parentesco).CustomType<ParentescoVinculo>().Column("parentesco");
}
}
}
|