123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using Microsoft.AspNetCore.Identity;
- using Microsoft.EntityFrameworkCore.Metadata.Builders;
- using Microsoft.EntityFrameworkCore;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using MTWorkHR.Identity.Entities;
- namespace MTWorkHR.Identity.Configurations
- {
- public class UserConfiguration : IEntityTypeConfiguration<ApplicationUser>
- {
-
- public void Configure(EntityTypeBuilder<ApplicationUser> builder)
- {
- var hasher = new PasswordHasher<ApplicationUser>();
- builder.HasData(
- new ApplicationUser
- {
- Id = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
- FirstName = "Zinab",
- LastName ="Elgendy",
- UserName = "Admin",
- Email = "a@b.com",
- NormalizedEmail = "A@B.COM",
- EmailConfirmed = true,
- NormalizedUserName = "ADMIN",
- PhoneNumber = "1234567890",
- PhoneNumberConfirmed = true,
- IsDeleted = false,
- IsStopped = false,
- DeleteUserId = null,AccessFailedCount = 0,UserType = 1,
- ConcurrencyStamp= "7cc87689-9eab-4280-b8e3-1834080783a5",
- SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
- PassportNumber = "1234567",
- TaxNumber = 111,
- IncomeTaxValue = 1,QualificationId = 1,
- PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==" //hasher.HashPassword(null, "P@ssword1")
- },
- new ApplicationUser
- {
- Id = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
- FirstName = "Ali",
- LastName = "Farok",
- UserName = "ali",
- Email = "ali@b.com",
- NormalizedEmail = "ALI@B.COM",
- EmailConfirmed = true,
- NormalizedUserName = "ALI",
- PhoneNumber = "1234567890",
- PhoneNumberConfirmed = true,
- DeleteUserId = null,
- AccessFailedCount = 0,
- IsDeleted = false,
- IsStopped = false,
- UserType = 1,
- ConcurrencyStamp = "4af7b4cf-802a-455b-b598-997e167745b3",
- SecurityStamp = "62549056-1b9d-46d4-84f8-adea3e4d8b68",
- PassportNumber = "7654321001010",
- TaxNumber = 222,
- IncomeTaxValue = 100,
- QualificationId = 1,
- PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ=="// hasher.HashPassword(null, "P@ssword1")
- }) ;
- }
- }
- }
|