コード例 #1
0
 public void Create(User user, string password)
 {
     IdentityResult addUserResult = _userManager.Create(user, password);
     if (!addUserResult.Succeeded)
     {
         foreach (var error in addUserResult.Errors)
             new DomainNotification("AssertArgumentLength", error);
     }
 }
コード例 #2
0
        public User Create(CreateUserCommand commandUser)
        {
            var user = new User(commandUser.IdPerson, commandUser.Email, commandUser.UserName);
            user.Validate();
            _repository.Create(user, "C@achinP1an");

            if (Commit())
                return user;

            return null;
        }
コード例 #3
0
        public void Delete(User user)
        {
            _context.Person.Remove(user.Person);

            IdentityResult deleteUserResult = _userManager.Delete(user);
            if (!deleteUserResult.Succeeded)
            {
                foreach (var error in deleteUserResult.Errors)
                    new DomainNotification("AssertArgumentLength", error);
            }
        }
コード例 #4
0
 public CreateSessionCommand(CoachingProcess coachingProcess, string theme, User user, DateTime date, TimeSpan startTime, TimeSpan? endTime, ESessionClassification classification, string observation, ICollection<Job> job)
 {
     this.Theme = theme;
     this.Date = date;
     this.StartTime = startTime;
     this.EndTime = endTime;
     this.Classification = classification;
     this.CoachingProcess = coachingProcess;
     this.User = user;
     this.Observation = observation;
     this.Job = job;
 }
コード例 #5
0
 public UpdateSessionCommand(Guid id, CoachingProcess coachingProcess, string theme, User user, DateTime date, TimeSpan startTime, TimeSpan? endTime, ESessionClassification classification, string observation, ICollection<Job> job,ICollection<EvaluationCoach> coach, ICollection<EvaluationCoachee> coachee)
 {
     this.Id = id;
     this.Theme = theme;
     this.Date = date;
     this.StartTime = startTime;
     this.EndTime = endTime;
     this.Classification = classification;
     this.CoachingProcess = coachingProcess;
     this.User = user;
     this.Observation = observation;
     this.Job = job;
     this.Coach = coach;
     this.Coachee = coachee;
 }
コード例 #6
0
ファイル: Coachee.cs プロジェクト: luancarloswd/CoachingPlan
 public void ChangeUser(User user)
 {
     this.User = user;
     this.IdUser = user.Id;
 }
コード例 #7
0
 public ClaimsIdentity GenerateUserIdentityAsync(User user, string authenticationType)
 {
     return _repository.GenerateUserIdentityAsync(user, authenticationType);
 }
コード例 #8
0
 public ClaimsIdentity GenerateUserIdentityAsync(User user, string authenticationType)
 {
     var userIdentity = _userManager.CreateIdentity(user, authenticationType);
     return userIdentity;
 }
コード例 #9
0
 public void Update(User user, string newPassword)
 {
     _userManager.RemovePassword(user.Id);
     _userManager.AddPassword(user.Id, newPassword);
     _userManager.UpdateAsync(user);
 }
コード例 #10
0
 public void Update(User user)
 {
     _userManager.UpdateAsync(user);
 }