Пример #1
0
        public IHttpActionResult CreateNewOrganization([FromBody] OrgCreationModel orgCreationModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            CreateOrgRequest orgRequest;
            {
                orgRequest = new CreateOrgRequest(
                    orgCreationModel.Leader,
                    orgCreationModel.OrganizationName,
                    orgCreationModel.OrganizationDescription,
                    orgCreationModel.OrganizationTags);
            }
            var createdOrgId = _orgManager.CreateOrganization(orgRequest);

            return(Ok(createdOrgId));
        }