Example #1
0
        public async Task Update(Guid universityId, UpdateUniversityModel model)
        {
            var university = await _universitiesRepository.GetById(universityId);

            university.Update(model.Name, model.Email, model.PhoneNumber, model.Address);

            _universitiesRepository.Update(university);
            await _universitiesRepository.SaveChanges();
        }
Example #2
0
        public async Task <IActionResult> Update([FromRoute] Guid universityId, UpdateUniversityModel model)
        {
            await _universityService.Update(universityId, model);

            return(NoContent());
        }