我想像这样序列化一个 EF 模型
TableA theObject = db.TableA.find(uid);
XmlSerializer serializer = new XmlSerializer(typeof(TableA));
XmlWriter writer = XmlWriter.Create(Path.Combine(directory, filename));
serializer.Serialize(writer, theObject);
writer.Close();
但是代码中断了,它说它不能序列化成员,因为它是一个接口。有人知道该怎么做吗?