コード例 #1
0
        public virtual BOCustomer MapEFToBO(
            Customer ef)
        {
            var bo = new BOCustomer();

            bo.SetProperties(
                ef.Id,
                ef.Email,
                ef.FirstName,
                ef.LastName,
                ef.Phone);
            return(bo);
        }
コード例 #2
0
        public virtual Customer MapBOToEF(
            BOCustomer bo)
        {
            Customer efCustomer = new Customer();

            efCustomer.SetProperties(
                bo.Email,
                bo.FirstName,
                bo.Id,
                bo.LastName,
                bo.Phone);
            return(efCustomer);
        }
コード例 #3
0
		public virtual BOCustomer MapModelToBO(
			int id,
			ApiCustomerRequestModel model
			)
		{
			BOCustomer boCustomer = new BOCustomer();
			boCustomer.SetProperties(
				id,
				model.Email,
				model.FirstName,
				model.LastName,
				model.Phone);
			return boCustomer;
		}