0

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

1

2 Answers 2

1

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!

Sign up to request clarification or add additional context in comments.

Comments

0

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.

2 Comments

in step 5, they say Connect the data model to the database. I don't have the northwind database but i can download it. so, should i add it to my sql server 2008 r2? or what please?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.