0

Here is the folder structure of my project in visual studio

UI
->App
    -->Directive
    -->Service
    -->Utilities
->Content
->Controllers
->Models
->Scripts
->Views

All the angular code is inside the app->directive folder. Scripts are inside the scripts folder and css inside the content folder.

I have worked on the front end part where the user selects inputs from dropdown. My query is how can i pass this dropdown value to backend using C#. and where do i have to create the C# file in the folder structure. How will i link the C# file with the angular code.

Once this is done, i have to interact with the SQL database too. I dont know where to put the sql code. The folder structure and interaction is confusing for me. Can someone please give me a simple example of how i can get started with. It will be great help.

I tried searching online and there are tons of different examples and its getting me more confused. Please help me !!!

1 Answer 1

1

as the backend (c#), the service side, you can use web api to connect with your database and connect with the client-side (angularjs) through json data. There is also a tutorial by microsoft with an example with that architecture

http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/build-a-single-page-application-(spa)-with-aspnet-web-api-and-angularjs

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

2 Comments

thanks tunna. this is wat i was looking for. its a great help for me. thanks
This link was helpful for our new Angular/c#/SQL project

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.