Example #1
0
        public virtual ApiCityResponseModel MapBOToModel(
            BOCity boCity)
        {
            var model = new ApiCityResponseModel();

            model.SetProperties(boCity.Id, boCity.Name, boCity.ProvinceId);

            return(model);
        }
Example #2
0
        public virtual BOCity MapEFToBO(
            City ef)
        {
            var bo = new BOCity();

            bo.SetProperties(
                ef.Id,
                ef.Name,
                ef.ProvinceId);
            return(bo);
        }
Example #3
0
        public virtual City MapBOToEF(
            BOCity bo)
        {
            City efCity = new City();

            efCity.SetProperties(
                bo.Id,
                bo.Name,
                bo.ProvinceId);
            return(efCity);
        }
Example #4
0
        public virtual BOCity MapModelToBO(
            int id,
            ApiCityRequestModel model
            )
        {
            BOCity boCity = new BOCity();

            boCity.SetProperties(
                id,
                model.Name,
                model.ProvinceId);
            return(boCity);
        }