How to convert a XML file based on attributes to an XML file based on child nodes by using XSLT.

I wanted to convert a XML based on attributes to a XML based on child nodes, e.g.:   Input <?xml version="1.0" encoding="utf-8" ?> <people> <person firstname="John" lastname="Smith"/> <person firstname="Michael" lastname="Johnson"/> <person firstname="Jacob" lastname="Williams"/> </people> Output <people> <person> <firstname>John</firstname> <lastname>Smith</lastname> </person> <person> <firstname>Michael</firstname> <lastname>Johnson</lastname> </person> <person> <firstname>Jacob</firstname> <lastname>Williams</lastname> </person> </people> XSLT …

How to update a entity in EF 4.2, when using Configuration.AutoDetectChangesEnabled = false.

  When you use DbContext.Configuration.AutoDetectChangesEnabled = false to improve performance, then there will be no automatically state tracking (this is what’s causing the performance penalty). To update a entity in the database, including it’s releated entities (navgiation properties), you should use the Entry function on the DbContext: using System.Data.Entity; using …