Created
November 18, 2020 19:03
-
-
Save JIOO-phoeNIX/bee44f26247a1ebef1fddcc4f3f89b39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
namespace Employee.DataAccess.Model | |
{ | |
public class Employee | |
{ | |
[Key] | |
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] | |
public Guid id { get; set; } | |
[Required(ErrorMessage = "Name is required")] | |
public string name { get; set; } | |
[Required(ErrorMessage = "Department is required")] | |
public string department { get; set; } | |
[Required(ErrorMessage = "Email is required")] | |
[EmailAddress] | |
public string email { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment