mtsys

Untitled

Mar 21st, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.34 KB | None | 0 0
  1. using MTSys.WebApp.Dominio.DTO;
  2. using MTSys.WebApp.Dominio.Interfaces;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel.DataAnnotations.Schema;
  7. using System.Linq;
  8. using System.Text;
  9.  
  10. namespace MTSys.WebApp.Dominio.Entidades
  11. {
  12.     public class Cliente : IEntidadeBase, IFixo, IPessoaDTO
  13.     {
  14.         [Key]
  15.         public int ClienteID { get; set; }
  16.  
  17.         public int PessoaID { get; set; }
  18.  
  19.         #region DadosInterface
  20.         public string Fixo { get; set; }
  21.         public string Status { get; set; }
  22.         public string Apagado { get; set; }
  23.  
  24.         public int VisaoID { get; set; }
  25.  
  26.         public int UsuCad { get; set; }
  27.         public DateTime DtCad { get; set; }
  28.         public int UsuAlt { get; set; }
  29.         public DateTime DtAlt { get; set; }
  30.         public int? UsuApagado { get; set; }
  31.         public DateTime? DtApagado { get; set; }
  32.         #endregion        
  33.  
  34.         [ForeignKey("PessoaID")]
  35.         public virtual Pessoa Pessoa { get; set; }
  36.         [NotMapped]
  37.         public PessoaDTO PessoaDTO { get; set; }
  38.  
  39.         public void DTO()
  40.         {
  41.             if (Pessoa != null)
  42.             {                
  43.                 PessoaDTO = new PessoaDTO();
  44.                 PessoaDTO.Popular(Pessoa);
  45.             }
  46.         }
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment