public async Task <ActionResult <ConfDoctor> > AddConfDoctorAsync(ConfDoctor confDoctors)
        {
            var addReturn = await _confDoctorsRepository.Add(confDoctors);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetConfDoctor", new { id = confDoctors.Id }, confDoctors));
            }

            return(BadRequest());
        }
        public async Task <ActionResult <Contact> > AddContactAsync(Contact contact)
        {
            var addReturn = await _contactRepository.Add(contact);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetContact", new { id = contact.Id }, contact));
            }

            return(BadRequest());
        }
Esempio n. 3
0
        public async Task <ActionResult <Expertise> > AddExpertiseAsync(Expertise expertise)
        {
            var addReturn = await _expertiseRepository.Add(expertise);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetExpertise", new { id = expertise.Id }, expertise));
            }

            return(BadRequest());
        }
        public async Task <ActionResult <City> > AddCityAsync(City city)
        {
            var addReturn = await _cityRepository.Add(city);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetCity", new { id = city.Id }, city));
            }

            return(BadRequest());
        }
        public async Task <ActionResult <Document> > AddDocumentAsync(Document document)
        {
            var addReturn = await _documentRepository.Add(document);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetDocument", new { id = document.Id }, document));
            }

            return(BadRequest());
        }
        public async Task <ActionResult <Schedule> > AddScheduleAsync(Schedule schedule)
        {
            var addReturn = await _scheduleRepository.Add(schedule);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetSchedule", new { id = schedule.Id }, schedule));
            }

            return(BadRequest());
        }
        public async Task <ActionResult <Role> > AddRoleAsync(Role role)
        {
            var addReturn = await _roleRepository.Add(role);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetRole", new { id = role.Id }, role));
            }

            return(BadRequest());
        }
        public async Task <ActionResult <Adress> > AddAdressAsync(Adress adress)
        {
            var addReturn = await _adressRepository.Add(adress);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetAdress", new { id = adress.Id }, adress));
            }

            return(BadRequest());
        }
Esempio n. 9
0
        public async Task <ActionResult <DocsecRel> > AddDocsecRelAsync(DocsecRel ocsecRel)
        {
            var addReturn = await _ocsecRelRepository.Add(ocsecRel);

            if (addReturn != null)
            {
                return(CreatedAtAction("GetDocsecRel", new { id = ocsecRel.Id }, ocsecRel));
            }

            return(BadRequest());
        }