Answered by:
Angularjs with MSSQL Server with out webapi or entityframework

Question
-
User-1075244417 posted
I'm building my first
Angular
application with .NET.I use
VS 2015
andC#
andSQL Server 2008R2
.I'm really excited about this but, despite the almost daunting amount of tutorials and docs available, I can't find a clear explanation of how to retrieve the data from SQL server and display it in my app.
I have been playing around a bit with Dan Wahlin's Customer Manager app, but this is built with
Entity Framework
andBreezeJS
, which are both new to me.I have also tried to follow this Code Project which builds communication with the server via a standard web service and what looks like an
ajax
call to retrieve somejson
.However there is no server side code to deserialize the SQL into Json (which I assume is necessary).
This is what I would like:
- an example of how to connect my Angular app to SQL Server DB.
- the example should mention the steps involved to achieve that.
I don't expect a comprehensive list of all the possible ways of doing this and I'm not asking you to do it for me.
I'm just hoping for a way good enough to get me started.
Thank you very much.
Wednesday, October 7, 2015 7:56 AM
Answers
-
User61956409 posted
Hi arunsilivery,
This article explained how to get data in JSON format using AngularJS.
http://www.c-sharpcorner.com/UploadFile/cd7c2e/make-ajax-call-and-return-json-using-angularjs925/
However there is no server side code to deserialize the SQL into JsonBesides, in this blog, we will see how to Serialize and Deserialize the objects to JSON.
Best Regards,
Fei Han
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, October 9, 2015 4:55 AM
All replies
-
User37182867 posted
If you are looking for quick and easy access to data then look at Linq To SQL. Its a little older and not as full featured as Entity Framework but is very easy to understand and get started with. It will also give you a jump start on EF and Linq both are very good things to understand when working with .net.
Wednesday, October 7, 2015 8:20 AM -
User1444407342 posted
Hello! maybe this link help you:
http://www.infragistics.com/community/blogs/dhananjay_kumar/archive/2015/05/13/how-to-use-angularjs-in-asp-net-mvc-and-entity-framework-4.aspx
Wednesday, October 7, 2015 9:45 AM -
User1066278571 posted
Here's an example of a solution
https://damienbod.wordpress.com/2015/08/30/asp-net-5-with-sqlite-and-entity-framework-7/
You could just use an Entity Framework SQL provider instead of the SQLite provider
Greetings Damien
Thursday, October 8, 2015 3:39 PM -
User61956409 posted
Hi arunsilivery,
This article explained how to get data in JSON format using AngularJS.
http://www.c-sharpcorner.com/UploadFile/cd7c2e/make-ajax-call-and-return-json-using-angularjs925/
However there is no server side code to deserialize the SQL into JsonBesides, in this blog, we will see how to Serialize and Deserialize the objects to JSON.
Best Regards,
Fei Han
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, October 9, 2015 4:55 AM