blob: cceda11976573866b8434b1a58c5f3b895c3c3c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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 VendedorUsuarioMap : ClassMap<VendedorUsuarioDb>
{
public VendedorUsuarioMap()
{
base.Table("vendedorusuario");
base.LazyLoad();
base.Id((VendedorUsuarioDb x) => (object)x.Id).GeneratedBy.Identity().Column("idvendedorusuario");
base.References<UsuarioDb>((VendedorUsuarioDb x) => x.Usuario).Column("idusuario").Not.Nullable().Fetch.Join();
base.References<VendedorDb>((VendedorUsuarioDb x) => x.Vendedor).Column("idvendedor").Not.Nullable().Fetch.Join();
}
}
}
|