public OrganisationDetailsViewModel()
 {
     BusinessName            = new BusinessNameViewModel();
     OperatingIndustries     = new OperatingIndustriesViewModel();
     OperatingCountries      = new OperatingCountriesViewModel();
     Turnover                = new TurnoverViewModel();
     CommunicationPreference = new CommunicationPreferenceViewModel();
     Address              = new AddressViewModel();
     BusinessPhoneNumber  = new BusinessPhoneNumberViewModel();
     BusinessMobileNumber = new BusinessMobileNumberViewModel();
     BusinessEmailAddress = new BusinessEmailAddressViewModel();
     BusinessWebsite      = new BusinessWebsiteViewModel();
     LegalStatus          = new LegalStatusViewModel();
     BusinessCredentials  = new BusinessCredentialsViewModel();
 }
        /// <summary>
        /// To the view model.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <returns></returns>
        public static LegalStatusViewModel ToViewModel(this LegalStatusModel model)
        {
            if (model == null)
            {
                return(null);
            }

            var entity = new LegalStatusViewModel
            {
                LegalStatusID = model.LegalStatusID,
                LegalStatus   = model.LegalStatus
            };

            return(entity);
        }
        /// <summary>
        /// To the model.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns></returns>
        public static LegalStatusModel ToModel(this LegalStatusViewModel entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new LegalStatusModel
            {
                LegalStatusID = entity.LegalStatusID,
                LegalStatus   = entity.LegalStatus
            };

            return(model);
        }
 public IActionResult LegalStatus(LegalStatusViewModel model)
 {
     return(OrganisationDetailsPost(model, nameof(LegalStatus)));
 }
 private static LegalStatusEnum?MapNullableLegalStatus(LegalStatusViewModel model)
 {
     return(model.LegalStatus);
 }