Added authentication and authorization, updated dependency injections, removed hard-coded connection string
This commit is contained in:
		| @@ -0,0 +1,22 @@ | ||||
| using Domains.Users; | ||||
| using Microsoft.EntityFrameworkCore; | ||||
| using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||||
|  | ||||
| namespace Infrastructure.Database.Users.Configuration | ||||
| { | ||||
|     public class UserConfiguration : IEntityTypeConfiguration<User> | ||||
|     { | ||||
|         public void Configure(EntityTypeBuilder<User> entity) | ||||
|         { | ||||
|             entity.Property(u => u.Email) | ||||
|                 .IsUnicode(false) | ||||
|                 .HasMaxLength(254); | ||||
|  | ||||
|             entity.HasIndex(u => u.Email).IsUnique(); | ||||
|  | ||||
|             entity.Property(u => u.Password) | ||||
|                 .IsUnicode(false) | ||||
|                 .HasMaxLength(50); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user