Exemple #1
0
        public CocktailUserCommentDTO MapViewToDTO(CocktailUserCommentVM view)
        {
            var dto = new CocktailUserCommentDTO
            {
                CocktailId   = view.CocktailId,
                CocktailName = view.CocktailName,
                UserId       = view.UserId,
                UserName     = view.UserName,
                Text         = view.Text,
                IsFlagged    = view.IsFlagged,
            };

            return(dto);
        }
Exemple #2
0
        public CocktailUserCommentVM MapDTOToView(CocktailUserCommentDTO dto)
        {
            var view = new CocktailUserCommentVM
            {
                CocktailId   = dto.CocktailId,
                CocktailName = dto.CocktailName,
                UserId       = dto.UserId,
                UserName     = dto.UserName,
                Text         = dto.Text,
                IsFlagged    = dto.IsFlagged,
            };

            return(view);
        }