I'm new to using the ASP.net MVC framework (and C# too). I have more experience using JSP + JSTL MVC framework. I want to know how to run custom queries if I need to do more complex sql. In the JSP framework, I'm used to creating DAOs to query sql tables which doesn't seem to be the case in ASP.net. For ASP.net, I noticed that we use LINQ to do the querying over a DBSet object from a model.
My Questions:
- Where do I write the custom query code? In the model?
- How do I write it? Is it through some sort of db.execute statements?
- Are there any configuration changes I need to make?
- Examples and other resources would be nice.
I tried looking through the asp.net MVC tutorials on asp.net, but I couldn't find anything.
SQLDataAdapterand you can excute customized query. msdn.microsoft.com/en-us/library/…