C# 使用post Web API C返回用户配置文件#

C# 使用post Web API C返回用户配置文件#,c#,asp.net-web-api2,C#,Asp.net Web Api2,我正在为社交媒体应用程序开发一个web api。我在post类中检索单个post数据 public class Post { public int postId { get; set; } [Required] public string postAuthor { get; set; } [Required, StringLength(4000, MinimumLength = 1)] public string postText { get; set

我正在为社交媒体应用程序开发一个web api。我在post类中检索单个post数据

public class Post
{
    public int postId { get; set; }

    [Required]
    public string postAuthor { get; set; }

    [Required, StringLength(4000, MinimumLength = 1)]
    public string postText { get; set; }

    public int postPrivacy { get; set; }

    public string dateEdited { get; set; }

 }
}

我需要在同一查询中检索author图像,但author图像字段在author类中,我是否应该为图像添加字段?或者我如何解决这个问题?

您需要为这个问题提供更多的上下文,即
作者类的代码,您如何存储数据等。是的,您需要为图像添加一个字段。要发布映像,映像对象应以字节为单位进行转换,并对其进行序列化/反序列化。我只存储映像名称,它是一个字符串字段