Action Filter in WebApi 2
Its been a while I haven’t blogged for sometime. To create an action filter in Web Api 2 and return the response directly you can use the code below public class StepUpAttribute : ActionFilterAttribute { public…
Its been a while I haven’t blogged for sometime. To create an action filter in Web Api 2 and return the response directly you can use the code below public class StepUpAttribute : ActionFilterAttribute { public…
You can use this function to replace the invisible chars Regex.Replace(s, @"[^x20-x7F]", "");
To convert your DTO to become Camel Case, you can use the code below //Camel Case settings var settings = GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings; settings.ContractResolver = new CamelCasePropertyNamesContractResolver(); settings.Formatting = Formatting.Indented;
I have an Excel file that need to be exported into XML. I have a few files to be converted. One of them was complaining when I’m about to export it to XML and it throws…
I got this code snippet to remove "TestHarness" folder only on the Release Mode but when I publish it on the "Debug" Mode the folder should still be there. It is a simple code but it…
Another helpful debugging tool that can be used is FusionLog – it is already installed in your machine by default and what this tool does is basically logging and telling us where the assembly is loaded…
Simple sample in how to use Table Valued Parameter which is a new feature in SQL Server 2008. I found it very useful to pass bulk data from one SP to another SP CREATE TYPE JobQueueBroker…
Just in case if in your development environment has a hardcoded drive mapping path in your config file and you don’t have the drive exists in your local The workaround is run the command below C:WindowsSystem32SUBST…