joaopaulofcc

Untitled

Nov 17th, 2021 (edited)
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System.ComponentModel.DataAnnotations;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3.  
  4.  
  5. namespace conexaoPostgre.Models
  6. {
  7.     public partial class Colaborador
  8.     {
  9.         [Key]
  10.         public int Id { get; set; }
  11.         [Required]
  12.         public string Nome { get; set; }
  13.         [Required]
  14.         public float Salario { get; set; }
  15.         [ForeignKey("Cargo")]
  16.         [Required]
  17.         public int IdCargo { get; set; }
  18.         public Cargo Cargo { get; set; }
  19.     }
  20. }
Add Comment
Please, Sign In to add comment