user2059935
user2059935

Reputation: 971

creating rest webservice on entity framework

first of all

i am planning to my project.So, i am just making research.

now

i have a project that contains data access layer.

to build that layer, i know this solutions:

  1. creating a stored procedures and call it from my code. This way is very old.
  2. working with linq with sql. I read that this way will be die soon.
  3. working with entity framework. i tested it and make a small test project. it seems that it contains all what i need.

my project should give a web services.

I make a research about web services and I found that RESTFUL web service is suitable to my need.

my question

what is the best way to create web servcies on a project that its access layer is entity framework

Upvotes: 0

Views: 4067

Answers (2)

user373455
user373455

Reputation: 13271

I would recommend using .NET Web API.
You can read more about it here: http://www.asp.net/web-api

Just add a new Web API project, which communicates with your data-access layer, and you're good to go!

Upvotes: 1

Roy Dictus
Roy Dictus

Reputation: 33149

The easiest way would be to use WCF Data Services. This makes it easy to expose an Entity Framework model using the OData protocol, which uses the semantics of REST.

See also http://msdn.microsoft.com/en-us/library/cc668792(v=vs.110).aspx for more about WCF Data Services. This requires .NET 4.0 or 4.5.

Upvotes: 0

Related Questions