C# MVC: HttpContextBase from HttpContext.Current
It’s easy by using the HttpContextWrapper HttpContextBase basecontext = (new HttpContextWrapper(HttpContext.Current)); Happy coding!
It’s easy by using the HttpContextWrapper HttpContextBase basecontext = (new HttpContextWrapper(HttpContext.Current)); Happy coding!
If you need to check if something is a number, in C# doesn’t exist a function for that. That I’ve created the following code. public bool IsNumeric(object Expression) { if (Expression == null || Expression is DateTime) return false; if (Expression is Int16 || Expression is Int32 || Expression is Int64 || Expression is Decimal…
Often you copy from a site some code but it has line numbers and you have to spend some times to remove them. With my simple tool on line, you can remove them quickly. Try it!
If you work with Visual Studio 2015 and WebAPI, this short post is for you! We have to make our Web API project easy to debug so, I’m going to remove the XML formatter. I’m doing that because I’m in a test project and I’d like to see the response in the browser. The easily…
In the two previous post I discussed about the first step to creare this application and the implementation of the business logic. Now we can implement the error handling. We have two custom exception classes: ShorturlConflictException (when a segment already exists) and ShorturlNotFoundException (when a segment isn’t found in the database). There is also a…
In my previsious post I discussed the first implementation of this application. In this post I’m explained how to implement the business layer. First of all you make sure the Business project references the Data, Entities and Exceptions projects. In the Exceptions project you add two new classes: ShorturlConflictException using System; using System.Collections.Generic; using System.Linq;…
There are a number of specific Agile approaches, as well as a generic agile style of working. Extreme Programming is a software development methodology, containing mainly programming practices such as Test Driven Development, Pair programming and Continuous Integration, but little management. Lean, which came from the manufacturing environment, is all about efficient processes. The focus…