Change
var query = from items in realestate.Descendants("Property")
select new
{
Name = items.Attribute("Name").Value,
Image = items.Attribute("Image").Value,
Location = items.Attribute("Location").Value,
Rooms = items.Attribute("Rooms").Value,
PropertyValue = items.Attribute("PropertyValue").Value,
Contact = items.Attribute("Contact").Value,
Description = items.Attribute("Description").Value
};
to
var query = from prop in realestate.Descendants("Property")
select new
{
Name = (string)prop.Element("Name"),
Image = (string)prop.Element("Image"),
Location = (string)prop.Element("Location"),
Rooms = (string)prop.Element("Rooms"),
PropertyValue = (string)prop.Element("PropertyValue"),
Contact = (string)prop.Element("Contact"),
Description = (string)prop.Element("Description")
};