c# - Location of calls to SQL SP in controller -
Newbie here again I got a controller in C #, I need to call SQL, I feel a lack of formatting skills. 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: 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.
namespace invoiceViewer.Controllers {public class invoice controller: API controller {& lt; Region One & gt; } & Lt; Region Two & gt; }
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 () ; }}}
Comments
Post a Comment