public User Add(ViewModels.RegisterViewModel register) { // TODO: Add insert logic here var newAttorney = new User(); newAttorney.User_Id = Guid.NewGuid(); newAttorney.User_Code = register.Code; newAttorney.Hashed_Password = BCrypt.Net.BCrypt.HashPassword(register.Password); db.User.Add(newAttorney); db.SaveChanges(); return newAttorney; }
public AttorneyIdentity(IIdentity identity, User attorney) { _identity = identity; this.Attorney = attorney; }