Database Reference
In-Depth Information
there is a wonderful utility at http://json2csharp.com/ that enables you to
paste in JSON to generate a C# class. More details on how you will accomplish
this after you have created the solution.
You will need Visual
Studio to do this
work. The content
in this topic was
developed using
Visual Studio 2010
Professional, but
both Visual Studio
2012 Professional
and the free version
(Visual Studio Express
for Web, available
at  http://msdn
.microsoft.com/
en-us/library/
dd537667.aspx )
should also work.
In this section you will be creating a new C# web service, enabling it for use
by JavaScript, using the converter to create a C# class that generates JSON,
and adding code to put data in that new class.
Open up Visual Studio and create a new project. Go to File and select New pro-
ject a Visual C#, then WCF in the left-hand panel, and WCF Service Application
on the main screen.
wIndows CommunICATIon FoundATIon (wCF)
Windows Communication Foundation (WCF) is Microsoft's programming
model for using managed code to build unified web services and other
distributed systems that can talk to each other. It replaces the earlier “ASMX”
web services that were provided in .NET.
You can see the new project screen in Figure 9-7.
FIguRe 9 -7 New Project screen
Search WWH ::




Custom Search