예제 #1
0
        public ActionResult UpdateMember(int id, MemberUpdateDto memberUpdateDto)
        {
            var memberModel = _repository.GetFamilyMemberById(id);

            if (memberModel == null)
            {
                return(NotFound());
            }

            _mapper.Map(memberUpdateDto, memberModel);
            _repository.UpdateMember(memberModel);
            _repository.SaveChanges();

            return(NoContent());
        }