XML serializer returns null on object deserialization
问题 I have a stored procedure in the database which returns an XML stream, and the application deserializes that stream into its corresponding object. The stored procedure is defined like this (I simplified it to make it more readable): SELECT usrs.FirstName AS 'FirstName', usrs.LastName AS 'LastName', usrs.Username AS 'Username', usrs.DateJoined AS 'DateJoined' FROM USERS AS usrs WHERE usrs.Username = @username FOR XML PATH('UserProfile') Notice that Username is a primary key, so the stored