Note : This is an alternate solution for This Article.
Alternate Solution for JSON Serialization
You can use Json.NET library to serialize Entity FrameWork object. It is fast and more effective then given solution. JavascriptSerialization but it is taking more time then Json.NET.
You can find source code from : http://json.codeplex.com/
Simple Example
using (FrameworkContainer fc = new FrameworkContainer())
{
var realObject = fc.GetAccountInformation("AmitGajjar");
using (MemoryStream ms = new MemoryStream())
{
var result = from account in realObject
select new
{
Name = account.Account_Name,
City = account.Address1_City,
Phone = account.Address1_Telephone
};
var serializedObject = JsonConvert.SerializeObject(result);
}
}
Hope this will help you to implement serialization very quickly.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.