public static ViewCount ToDto(Db.ViewCount viewCount) { return viewCount == null ? null : new ViewCount { PostId = viewCount.PostId, Id = viewCount.Id, UserId = viewCount.UserId }; }