public virtual ApiCountryServerResponseModel MapServerRequestToResponse( int id, ApiCountryServerRequestModel request) { var response = new ApiCountryServerResponseModel(); response.SetProperties(id, request.Name); return(response); }
public virtual ApiCountryServerResponseModel MapEntityToModel( Country item) { var model = new ApiCountryServerResponseModel(); model.SetProperties(item.Id, item.Name); return(model); }
public virtual ApiCountryRequirementServerResponseModel MapEntityToModel( CountryRequirement item) { var model = new ApiCountryRequirementServerResponseModel(); model.SetProperties(item.Id, item.CountryId, item.Details); if (item.CountryIdNavigation != null) { var countryIdModel = new ApiCountryServerResponseModel(); countryIdModel.SetProperties( item.CountryIdNavigation.Id, item.CountryIdNavigation.Name); model.SetCountryIdNavigation(countryIdModel); } return(model); }
public virtual ApiDestinationServerResponseModel MapEntityToModel( Destination item) { var model = new ApiDestinationServerResponseModel(); model.SetProperties(item.Id, item.CountryId, item.Name, item.Order); if (item.CountryIdNavigation != null) { var countryIdModel = new ApiCountryServerResponseModel(); countryIdModel.SetProperties( item.CountryIdNavigation.Id, item.CountryIdNavigation.Name); model.SetCountryIdNavigation(countryIdModel); } return(model); }