예제 #1
0
        public IActionResult PutFamily(int id, Family family)
        {
            if (id != family.Id)
            {
                return(BadRequest());
            }

            _familyRepository.Edit(family);

            try
            {
                _familyRepository.Save();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!FamilyExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
예제 #2
0
        public DataMessage Edit(EditFamily model)
        {
            DataMessage message;

            message = familyRepository.Edit(model);

            return(message);
        }