Sending these emails can often be a bottleneck in your workflow and cause the application to stall temporarily whilst the STMP client is instantiated, the email is generated and sent, then confirmation is returned. I will discuss a better way to do this within an MVC application.
The “anonymous” nature of placeholders in the String.Format method can make it confusing. Find out how to use named string placeholders in your code.
The idea of mapping objects together is quite simple. It’s like a “merge” the data from 2 objects into one single object. AutoMapper is one tool that helps you achieve this and I will explain some use cases for it.
We have all encountered the situation where we want to show user information on a form. Most people have a FirstName and a LastName (unless you’re Prince or Bono). Here is a way to quickly and easily concatenate MVC ViewModel fields without having to use String.Format.
ASP.Net validation is very useful and allows developers to ensure data is correct before it gets sent to a data store. I would like to explain some best practices and suggestions for you when implementing ASP.Net validation.
There is a large set of C# operators, which are symbols that specify which operations to perform in an expression. Here is a list of operators I frequently use and a brief explanation with code examples.
This post is following on the series I wrote about initially here – Succinct C# Methods. This post concentrates on Ternary Operators.
If you are like me, you are always trying to write your code as efficiently as possible. So, I thought I would start a series of posts that reflect my research on this topic. The first article in this series relates to LINQ and Boolean methods.
I was recently happily coding away and disregarding the green squiggly line that Resharper was trying to force down my throat. NB I am a Resharper advocate, but sometimes I just don’t take notice of the prompts it gives me. Anyway, I decided to check what Resharper was telling me regarding my variable assignment and realised something I had not known before.