Skip to content

Instantly share code, notes, and snippets.

@JIOO-phoeNIX
Created November 18, 2020 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JIOO-phoeNIX/bee44f26247a1ebef1fddcc4f3f89b39 to your computer and use it in GitHub Desktop.
Save JIOO-phoeNIX/bee44f26247a1ebef1fddcc4f3f89b39 to your computer and use it in GitHub Desktop.
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