Agribusiness.Web.Controllers.PersonController.UpdateAutomatedNotification C# (CSharp) Method

UpdateAutomatedNotification() private method

private UpdateAutomatedNotification ( int personId, int seminarId, bool automatedNotification ) : JsonNetResult
personId int
seminarId int
automatedNotification bool
return JsonNetResult
        public JsonNetResult UpdateAutomatedNotification(int personId, int seminarId, bool automatedNotification)
        {
            var person = _personRepository.GetNullableById(personId);

            if (person == null)
            {
                Message = string.Format(Messages.NotFound, "Person", personId);
                return new JsonNetResult(Message);
            }

            person.AutomatedNotification = automatedNotification;

            _personRepository.EnsurePersistent(person);

            return new JsonNetResult(string.Empty);
        }