OJ Develops

Thoughts, tips, and tricks on software development. .NET | C# | Azure

Login with AngularJS and ASP.NET Web API

26 December 2014

When creating a non-Web API ASP.NET MVC project using Individual Accounts, the generated template makes use of Forms Authentication. When logging in using Forms Authentication, a cookie is stored on the client's machine and that cookie is included by the browser in each future request.

Read More

Don't Make Me Think... About Your Code

29 November 2014

Don't Make Me Think is the title of the famous UX book by Steve Krug. One of the main ideas in the book is that a user interface should be designed in such a way that users' thinking is kept to a minimum. As much as possible, it should be obvious what actions the user must do to achieve a goal.

Read More

Entity Framework Code First Migrations

27 September 2014

So you've created your entities and had Entity Framework create your database for you. Now, you want to change your entities and of course also change the database schema. How do you go about doing that?

Read More

Using Fiddler to Examine Web Traffic

10 April 2014

When building typical web applications using ASP.NET WebForms and ASP.NET MVC, the usual way of testing and debugging is to see whether the page loaded correctly (ie whether it displays the correct data or not). However, when building ajax applications / single page applications, you want to test not only the appearance of the page but more importantly the results of API calls. Since these results may not be obvious by just looking at the page, we need a different method of testing.

Read More

How to Create a Console Application from Visual Studio Express for Web

01 April 2014

Web application solutions may not always be composed of only web site projects, web services, and class libraries. There are cases when console applications are needed as well. However, the default templates in the web express editions of Visual Studio do not include a console application template. In this post I will provide a workaround for that issue.

Read More

Common AngularJS Directives for Designers

25 February 2014

AngularJS is not only for UI developers, but also for UI designers. In fact, the separation of concerns and readability that AngularJS brings enable smooth collaboration between designers and developers. Here are some common directives that designers will encounter in AngularJS.

Read More

Multiple Many-to-Many Associations - Entity Framework Code First

28 January 2014

Entity Framework Code First lets you build domain classes first without an existing database. As soon as a database is needed, Entity Framework will create the database for you based on the shape of your classes. Entity Framework is smart enough to figure out things such as column names, column types, one-to-many associations, many-to-many associations, and more, according to your intentions. But sometimes, we have to explicitly tell the framework what our intentions are. In this post, we will talk about multiple many-to-many relationships.

Read More

AngularJS and Strongly Typed Views

14 January 2014

AngularJS is a powerful templating MVC Javascript framework developed by Google. In this post, we will be talking about how to use AngularJS with ASP.NET MVC, particularly with strongly-typed views.

Read More

Custom Validator in Fluent Validation

19 December 2013

Fluent validation is an excellent validation framework for and written in .NET. It is easy to use and supports the most common validation scenarios out of the box; I highly recommend that you use it in your projects. There are times, however, that you want to add your own validators in order to support your business rules. In this post, we will be implementing a custom generic validator with arguments.

Read More