OJ Develops

Thoughts on software development. .NET | C# | Azure

How to Send Email Using C#

05 August 2013

Sending email is a useful feature to have in many web applications. For instance, internet marketing strategies often involve using autoresponders to constantly send offers to subscribers. Daily reports can also be emailed to web administrators to keep them updated on the health of their site.

Read More

From Method to Func

13 July 2013

In this post we will take a journey from ordinary methods to the Func. Along the way, we will encounter delegates, anonymous methods and lambda expressions. If any of these concepts are unfamiliar to you, don't worry as they will be explained along the way.

Read More

Centralizing Session Access

17 June 2013

Storing and retrieving information from the session state is a common use case in most web applications. For example, user information might be retrieved from the database and then stored in the session upon log in of a user. Following this approach, database calls that retrieve information about a user are reduced (ideally to one call only).

Read More

Extension Methods

12 June 2013

Extension methods are a way to add functionality (methods) to types that you do not own or that you have no access to. This handy feature was introduced in .NET 3.5.

Read More

Using XML with SQL Server

10 June 2013

Sometimes there is a requirement to insert multiple values in the database. This can be done using bulk insert, table-valued functions, through XML, or simply by calling an insert procedure that inserts a single item multiple times. In this post we will be taking a look at how to do multiple inserts using a single query through XML using SQL Server 2008.

Read More

Serializing DateTime into JSON

05 June 2013

In my current project I ran into the requirement of serializing an object with a DateTime property into Json, specifically through the Json() method of the Controller class. I can't say it serialized pretty well though.

Read More

AngularJS: Using ng-repeat

22 May 2013

AngularJS is the Javascript MVC framework developed by Google. In this post we will build a simple application using AngularJS. If you aren't familiar with it, you might want to read my introduction to AngularJS first. This post will introduce the concept of controllers and the app will display a simple list of items (persons) to the view.

Read More