|
|
@ -81,7 +81,8 @@ namespace CoviDok.BLL.User |
|
|
|
LastName = registration.LastName, |
|
|
|
Email = registration.Email, |
|
|
|
Password = RoleUser.GetHashString(registration.Password), |
|
|
|
Role = Role.Ast |
|
|
|
Role = Role.Ast, |
|
|
|
Phone = registration.Phone |
|
|
|
}; |
|
|
|
context.Assistants.Add(ast); |
|
|
|
await context.SaveChangesAsync(); |
|
|
@ -93,7 +94,9 @@ namespace CoviDok.BLL.User |
|
|
|
LastName = registration.LastName, |
|
|
|
Email = registration.Email, |
|
|
|
Password = RoleUser.GetHashString(registration.Password), |
|
|
|
Role = Role.Doc }; |
|
|
|
Role = Role.Doc, |
|
|
|
Phone = registration.Phone |
|
|
|
}; |
|
|
|
context.Doctors.Add(doc); |
|
|
|
await context.SaveChangesAsync(); |
|
|
|
response.Body["id"] = doc.Id.ToString(); |
|
|
@ -105,7 +108,8 @@ namespace CoviDok.BLL.User |
|
|
|
LastName = registration.LastName, |
|
|
|
Email = registration.Email, |
|
|
|
Password = RoleUser.GetHashString(registration.Password), |
|
|
|
Role = Role.Par |
|
|
|
Role = Role.Par, |
|
|
|
Phone = registration.Phone |
|
|
|
}; |
|
|
|
context.Parents.Add(par); |
|
|
|
await context.SaveChangesAsync(); |
|
|
|