Exclude certain fields when returning as json
问题 I have an asp.net web api application. For now lets say that the application consists of a User entity and a Post entity. A post is written by a user, so every post entity contains a reference to the user entity. class Post { public int Id { get; set; } public string Title { get; set; } public string Content { get; set; } public User User { get; set; } // Reference to the user that wrote the post } The problem is when i want to return a list of posts as Json. I don't want to include the