Пример #1
0
        public void LinkToOrganisation(Organisation organisation)
        {
            Guard.ArgumentNotNull(() => organisation, organisation);

            if (Organisation != null)
            {
                throw new InvalidOperationException(
                    string.Format(
                        "User {0} is already linked to an organisation and may not be linked to another. This user is linked to organisation: {1}",
                        Id, Organisation.Id));
            }

            Organisation = organisation;
        }
Пример #2
0
 public void UpdateOrganisationOfUser(Organisation organisation)
 {
     Guard.ArgumentNotNull(() => organisation, organisation);
     Organisation = organisation;
 }
Пример #3
0
 public void UpdateOrganisationOfUser(Organisation organisation)
 {
     Guard.ArgumentNotNull(() => organisation, organisation);
     Organisation = organisation;
 }