Example #1
0
        public static Model.ProductInfo MapEntityToModelLight(DataAccess.Entity.Product entity)
        {
            if (entity == null)
            {
                return(null);
            }

            return(new Model.ProductInfo()
            {
                Id = entity.Id,
                Name = entity.Name,
            });
        }
Example #2
0
        //Mapper from the DataAccess Layer to the Service Layer
        public static Model.Product MapEntityToModel(DataAccess.Entity.Product entity)
        {
            if (entity == null)
            {
                return(null);
            }

            return(new Model.Product()
            {
                Id = entity.Id,
                Description = entity.Description,
                Name = entity.Name,
                Price = entity.Price,
                Is4G = entity.Is4G,
                Weight = entity.Weight
            });
        }