Last post Oct 14, 2014 12:48 PM by Siva Krishna Macha
Oct 13, 2014 01:33 PM|asad_dba|LINK
I want to inquire that in asp.net 4.5 is there any way I can put business logic in middle ware in form of class. if answer is yes how can achieve this .
Oct 13, 2014 02:47 PM|Siva Krishna Macha|LINK
Yes, you can always create "Class libraries" and put all your logic there. Class library project can contain simple C# files and can produce dll out of it. You can later refer the dll in your project to consume those APIs.
Other way of doing is, creating webservices or WCF services or Web APIs as business logic layers, where not just simple classes but you would need to write some set of additional code and config things to set up the framework.
This article explains step-by-step points to create simple class libaries and refering it in various dotnet apps.
Oct 14, 2014 10:47 AM|asad_dba|LINK
so we can define classes in web service and call them in asp.net. furthermore which is best way among WCF and web api, I believe webapi can only called by using jquery or alternatively we can call in asp.net using vb.
Oct 14, 2014 12:15 PM|Siva Krishna Macha|LINK
Yes there are different approaches.
1. Using Class libraries - these will produce simple dlls.
2. Using webservice layers
Webservice - asmx - old style - provides SOAP/XML format messages.
WCF - offers many protocols and message types, including HTTP, tcp.ip, MSMQ, WS HTTP etc.
Web API - If you want to have simple HTTP services - this is the place to go.
Oct 14, 2014 12:41 PM|asad_dba|LINK
nice, we can call webapi from any asp.net webpage or its jquery in order to call
Oct 14, 2014 12:48 PM|Siva Krishna Macha|LINK
We can call WebAPI from normal applications also, JQuery is not mandatory.
See this reference
Hope this helps.