c# - Location of calls to SQL SP in controller -


text = "post-text" itemprop = "text">

Newbie here again I got a controller in C #, I need to call SQL, I feel a lack of formatting skills.

  namespace invoiceViewer.Controllers {public class invoice controller: API controller {& lt; Region One & gt; } & Lt; Region Two & gt; }   

Should my phone be spotted in one or two areas? If two, then am I away from that class?

Please forgive me if this is a stupid question, then I'm learning C # for a week.

In your question, you propose to put the code inside the class definition that will not work.

Most patterns have data access layer, which is used to call databases and updates / get data from it, for example:

  namespace invoiceViewer .DAL {public static class invoicedale {public static foo GetFooData () {// DB access code goes here // get data // return data; Then in your category:  
  namespace invoiceViewer.Controllers {public class invoice controller: ApiController {public invoice controller} {} Public Zero DoStuff ()) {Foo data = invoice DAL.GetFooData () ; }}}   

If you are learning C # for a week, then I would suggest to do more with this project and learn more about it. Once you understand the basics, then look for something to start. The unit structure works with a database of air.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -