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