diff --git a/API_SQLuedo/EntityFramework/UserEntity.cs b/API_SQLuedo/EntityFramework/UserEntity.cs index aa2527f..ecbabcc 100644 --- a/API_SQLuedo/EntityFramework/UserEntity.cs +++ b/API_SQLuedo/EntityFramework/UserEntity.cs @@ -1,8 +1,11 @@ using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; namespace Entities; [Table("User")] +[Index(nameof(Username), IsUnique = true)] +[Index(nameof(Email), IsUnique = true)] public class UserEntity { public int Id { get; set; }