Example #1
0
        // PUT api/Organizations/5
        public OrganizationDto Put([FromBody] OrganizationDto organization)
        {
            var updatedOrganization = organization.ConvertFromDto();

            OrganizationService.Update(updatedOrganization);
            return(updatedOrganization.ConvertToDto());
        }
Example #2
0
        // POST api/Organizations
        public OrganizationDto Post([FromBody] OrganizationDto organization)
        {
            var newOrganization = organization.ConvertFromDto();

            OrganizationService.Add(newOrganization);
            return(newOrganization.ConvertToDto());
        }
Example #3
0
 // DELETE api/Organizations/5
 public void Delete([FromBody] OrganizationDto organization)
 {
     OrganizationService.Delete(organization.ConvertFromDto());
 }