Пример #1
0
 public static UserScore New(CreateOrUpdateUserScore createOrUpdateUserScore)
 {
     return(new(
                createOrUpdateUserScore.OrganizationGuid,
                createOrUpdateUserScore.UserGuid,
                createOrUpdateUserScore.Score));
 }
Пример #2
0
 public void Update(CreateOrUpdateUserScore createOrUpdateUserScore)
 {
     if (OrganizationGuid != createOrUpdateUserScore.OrganizationGuid ||
         UserGuid != createOrUpdateUserScore.UserGuid)
     {
         throw new ArgumentException("Wrong Guids for user score", nameof(createOrUpdateUserScore));
     }
     Score = createOrUpdateUserScore.Score;
 }