Articles with tag: aspnet5

Adding Dependency Injection to ASPNET 5 Console Applications

As it stands in the RC1-Update1 release of ASPNET 5 and DNX, (soon™ to become AspNetCore and the dotnet CLI respectively), you are not limited to only creating Web Applications; you can also create Class Libraries and Console Applications. Having been on the proverbial bandwagon for quite some time now, I have assisted in getting several ASPNET5 web applications into production, and dozens of class libraries. I recently came across the requirement to introduce a command line interface (CLI) to run some background jobs for one of our sites. In this post I’ll explain what I did to not only produce a professional looking CLI, but also to utilise our existing class libraries through dependency injection.

Read More

Managing Action Conflicts in ASP.Net 5 with Swashbuckle

For several weeks now we’ve been using Swashbuckle in our ASP.Net 5 Web API to assist document and even test our API endpoints. This is a brand new API, and we’ve been doing everything we can to follow best practices with regards to Web API’s. Our discussions and decisions regarding best practices are always focused upon the practices themselves, and not necessarily upon the technical implications of an outcome. Thanks to the superb extensibility of ASP.NET 5, this hasn’t been an issue. That is, until today, when we came across an issue that many others also seem to have had problems with.

Read More