Exemplo n.º 1
0
 public static UserEntity Map(UserModel model)
 {
     return(new UserEntity()
     {
         Id = model.Id,
         Login = model.Login,
         Role = model.Role,
         FirstName = model.FirstName,
         SecondName = model.SecondName,
         Image = ImageMapper.Map(model.Image),
     });
 }
Exemplo n.º 2
0
 public static UserModel Map(UserEntity entity)
 {
     return(new UserModel()
     {
         Id = entity.Id,
         Login = entity.Login,
         Role = entity.Role,
         FirstName = entity.FirstName,
         SecondName = entity.SecondName,
         Image = ImageMapper.Map(entity.Image),
     });
 }
        public static EstablishmentEntity Map(EstablishmentModel model)
        {
            if (model == null)
            {
                return(null);
            }

            return(new EstablishmentEntity()
            {
                Id = model.Id,
                Name = model.Name,
                Description = model.Description,
                Preview = ImageMapper.Map(model.Preview),
            });
        }
        public static EstablishmentModel Map(EstablishmentEntity entity)
        {
            if (entity == null)
            {
                return(null);
            }

            return(new EstablishmentModel()
            {
                Id = entity.Id,
                Name = entity.Name,
                Description = entity.Description,
                Preview = ImageMapper.Map(entity.Preview),
            });
        }
Exemplo n.º 5
0
        public static MealEntity Map(MealModel model)
        {
            if (model == null)
            {
                return(null);
            }

            return(new MealEntity()
            {
                Id = model.Id,
                Name = model.Name,
                Description = model.Description,
                Price = model.Price,
                Weight = model.Weight,
                Preview = ImageMapper.Map(model.Preview),
            });
        }
Exemplo n.º 6
0
        public static MealModel Map(MealEntity entity)
        {
            if (entity == null)
            {
                return(null);
            }

            return(new MealModel()
            {
                Id = entity.Id,
                Name = entity.Name,
                Description = entity.Description,
                Price = entity.Price,
                Weight = entity.Weight,
                Preview = ImageMapper.Map(entity.Preview),
            });
        }