Where are IApplicationServices registered in ABP framework? - asp.net-web-api

I know that services that implement IApplicationService are automatically registered but I cannot for the life of me find out where in the framework this happens. I have spent the last day searching through the ABP solution trying to understand how this works (in the context of dynamic API generation), so I can extend the functionality in a project I am working on, but have gotten no where so far. I appreciate any help I can get in sending me in the right direction.

For Dynamic WebApi controllers, a single controller is generated in Build method of ApiControllerBuilder class. You can check it here https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.Web.Api/WebApi/Controllers/Dynamic/Builders/ApiControllerBuilder.cs#L153.
I hope this helps.

Related

How to inject Mock Request Headers when using Apnet WebForms?

Is there any way to inject 'Mock' Request Headers for testing purposes when using Aspnet WebForms? I'm able to do this in my .NET CORE Projects using Middleware, but now I'd like to help a customer do the same thing with their Webforms project. I haven't worked with WebForms in many years, and I haven't found much online about this so far. I'm just looking for a starting point so I can investigate further. Thanks
Found Something here - will update later with my solution:
https://learn.microsoft.com/en-us/iis/configuration/system.webserver/httpprotocol/customheaders/

Helpme with own functions in api-platform

recently I have been working with symfony 4 in search of some solution for the creation of web services api-rest and I have found api-platform. After several days trying, because I do not have much knowledge of symfony, I managed to raise the API for an entity that I created by default. It turns out that now I have the doubt of how to add to the api methods other than those that are by default, say the put, the get and others that are already by default, I want to be able to add to my entity the methods that I estimate necessary and with the name that I want. Please I would appreciate your help with some form or some simple steps that allow me to add new methods to the api always keeping in mind that I do not have much knowledge in the matter.
try to avoid endpoint proliferation as much as possible, think REST
the recommended way to hook your own logic in API Platform is using the built-in events
if you really need to add custom endpoints, here is a dedicated documentation entry, but it should be your last resort (see 1/)

What is the purpose of adding services.AddMvc() in the ConfigureServices method in mvc 6?

Why is not enought to just add app.UseMvc() in the Configuration method in a mvc6 application? why it is also necessary to add the services.AddMvc() in the ConfigureServices method? and where can I find more info about this?
Thank you.
In this new ASP.NET 5 world there are two primary aspects of app development.
Dependency Injection. Aka what services are going to be required to run our application?
The application/request pipeline. Essentially the way we answer the question of "What to do when a request hits the server".
Due to these two primary concerns there then happens to be two mechanisms for tying into the system.
First, UseMVC is the way your application can say I want MVC to take a part in the request handling stage at "this" point. It's essentially a shortcut to an MVC specific middleware.
Second, AddMvc is the way your application says that you want the MVC services available to the system (needed in order for UseMvc) to work correctly. Therefore, if you were to try and do UseMvc without adding the corresponding MVC services the call would throw. Note that this adds the appropriate MVC services to the DI container.
Hopefully this answered your questions, for more information on it you can check out http://www.asp.net/vnext for more general information. For something more specific/video I did a talk a while back at Orchard conference where I go over several of the core pieces https://www.youtube.com/watch?v=kqgIByKn9Wk
Note: I gave the talk a while back, some concepts are outdated/may have changed but the core concepts are the same.

Conversation scope from Springfuse

Has anyone tried using the Conversation scope implementation from Springfuse? JSF2 Conversation Does it work well? Any use cases where it doesn't or issues encountered?
The link to browse their projects on Github is broken, but if you use their main page to generate a Primefaces, Spring and JPA project, the Conversation code is in there.
yes. We have been Springfuse conversation for little over an year now. It is very lighweight and doesnt need Spring web flow. It may take a while to get used to it as you dont have many samples examples except the auto generated code and a blog (http://www.springfuse.com/2013/03/05/jsf2-conversation.html). But it is worth having a try.

Database interaction with codeigniter and backbone.js

I am trying to learn backbone.js to make a web application.This is my first time with a javascript framework and I am fairly confused with some of the stuff.
I have been developing in codeigniter for a while so I do have a understanding of the MVC architecture.
My question is how do I get the data from the backbone.js front end to my codeigniter controller and save it in the database. for example to implement a simple login/register functionality with CI and backbone, how should I proceed. If anyone can guide me step step then that would be great or point me to the right resource. Thank you.
PS: I know that I have to implement a REST api with my codeigniter but I don't know how? so if someone can provide a basic controller example it'd be really helpful.
Here's a tutorial to use the API mentioned in the above reply (by the author of the library himself)
http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/

Resources