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

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

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