public static internalDTO.DomainLikeDTO.Comment MapFromExternal(externalDTO.Comment comment) { var res = comment == null ? null : new internalDTO.DomainLikeDTO.Comment() { Id = comment.Id, CommentTitle = comment.CommentTitle, CommentBody = comment.CommentBody, ProductId = comment.ProductId, ShopId = comment.ShopId }; return(res); }
public static internalDTO.Comment MapFromExternal(externalDTO.Comment comment) { var res = comment == null ? null : new internalDTO.Comment { Id = comment.Id, Timestamp = DateTime.UtcNow, CommentValue = comment.CommentValue, FoodItemId = comment.FoodItemId, AppUserId = comment.AppUserId, AppUser = AppUserMapper.MapFromExternal(comment.AppUser) }; return(res); }