3

I am looking for guidance on how to start building a http REST server using C# and a SQL Server database?

Is there a recommended server framework for http web server? The same for REST services?

How should I start? Raising regular server and after that taking care of the SQL Server database?

Thanks.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Michael A
  • 5,770
  • 16
  • 75
  • 127
  • 1
    Here's a question on StackOverflow looking at the advantages of ServiceStack vs WebApi: http://stackoverflow.com/questions/9699083/servicestack-vs-asp-net-web-api – mythz Apr 06 '12 at 21:53

3 Answers3

3

Use OData. Have a look at Creating an OData API for StackOverflow including XML and JSON in 30 minutes

Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569
3

Consider using the new ASP.NET Web API:

ASP.NET Web API is a framework that makes it easy to build HTTP services . . . ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.

It is currently in beta but was built specifically for building RESTful HTTP services in .NET, unlike WCF. See SO question WCF vs ASP.NET Web API for more details.

There are samples and video tutorials, and in one they are using Entity Framework models which can be backed by SQL. This SO question specifically covers that example: How to mix Entity Framework with Web API

Community
  • 1
  • 1
zackdever
  • 1,642
  • 1
  • 13
  • 22
3

I'm starting to evaluate REST frameworks for .Net and python. So far I like ServiceStack for .Net the best. It's simple, far easier to config than WCF, supports dependency injection, and seems to be fast.

When VS 11 and .Net 4.5 are completely released, Microsoft is also offering Web API. It can be used to build REST API's as well so it's worth looking into.

I haven't done enough research on Web API to see which would be better but those are some considerations for you.

Jeff LaFay
  • 12,882
  • 13
  • 71
  • 101