ChildRegistration.Controllers.ChildRegistrationController.RegisterNewChild C# (CSharp) Method

RegisterNewChild() private method

private RegisterNewChild ( System.Guid childId, string childName, int childAge, string countryName, string programType, string otherDetailsOnlyThisServiceCaresAbout, string childPhotoLink ) : System.Web.Mvc.ActionResult
childId System.Guid
childName string
childAge int
countryName string
programType string
otherDetailsOnlyThisServiceCaresAbout string
childPhotoLink string
return System.Web.Mvc.ActionResult
        public ActionResult RegisterNewChild(Guid childId, string childName, int childAge, string countryName, string programType, string otherDetailsOnlyThisServiceCaresAbout, string childPhotoLink)
        {
            using (var session = MvcApplication.DocumentStore.OpenSession())
            {
                session.Store(new Child
                {
                    ChildId = childId,
                    ChildName = childName,
                    ChildAge = childAge,
                    CountryName = countryName,
                    ProgramType = programType,
                    OtherDetailsOnlyThisServiceCaresAbout = otherDetailsOnlyThisServiceCaresAbout,
                    ChildPhotoLink = new Uri(childPhotoLink)
                });
                session.SaveChanges();
            }

            MvcApplication.Bus.Send<IChildRegisteredInProgram>(m =>
            {
                m.ChildId = childId;
                m.ChildName = childName;
                m.ChildAge = childAge;
                m.CountryName = countryName;
                m.ProgramType = programType;
                m.OtherChildDetailsThatOurServiceIsNotInterestedIn = otherDetailsOnlyThisServiceCaresAbout;
                m.ChildPhotoLink = new Uri(childPhotoLink);
            });

            return RedirectToAction("Index", "ChildRegistration");
        }