Пример #1
0
        public IHttpActionResult CreateGroup(NewGroup newGroup)
        {
            if (newGroup == null)
            {
                throw new ArgumentNullException("newGroup");
            }
            if (string.IsNullOrWhiteSpace(newGroup.Name))
            {
                throw new ArgumentException("Group name must be defined.");
            }

            Group group = mapperFactory.CreateGroupMapper()
                          .Map(identityManagementService.CreateGroup(newGroup.Name, newGroup.Description, newGroup.ExternalGroupName));

            return(Ok(group));
        }