Using Assembly in Visual Studio 2013

Summary In this blog post I’m going to demonstrate how to create an assembly language subroutine and call it from a C++ program. Assembly Language It’s been a few years since I’ve created any assembly language.  In fact, the last time I wrote a real assembly language program the tool to use was Borland’s Turbo … Read moreUsing Assembly in Visual Studio 2013

Entity Framework 6.1.3 vs. Linq2SQL vs. NHibernate Smackdown!

Summary I’ve done these ad-hoc ORM performance tests in the past.  In this test I’m going to re-test the latest Entity Framework (version 6.1.3) against the latest Linq-to-SQL version.  I’ll be using EF code-first this time to make sure there isn’t any extra overhead.  I’ll also be using Visual Studio 2013. The Hardware and Software … Read moreEntity Framework 6.1.3 vs. Linq2SQL vs. NHibernate Smackdown!

Data Caching with Redis and C#

Summary Caching is a very large subject and I’m only going to dive into a small concept that uses Redis, an abstract caching class, and a dummy caching class for unit testing and show how to put it all together for a simple but powerful caching system. Caching Basics The type of caching I’m talking … Read moreData Caching with Redis and C#

EF Code-First Stored Procedures With Parameters

Summary In an earlier post I showed how to create a method that can access a stored procedure using Entity Framework Code-First. In this post I’m going to show how to pass parameters and show a few tricks. The Stored Procedure First, you’ll need to create a new stored procedure in your APIUniversity database (see … Read moreEF Code-First Stored Procedures With Parameters

EF Code-First Stored Procedures

Summary In this post I’m going to show the very basics of calling a stored procedure from Entity Framework using the Code-First technique. The Database Setup First, I’m going to create a database named “APIUniversity”. If you’ve tried out the API projects from my previous posts, you probably already have this database in place and … Read moreEF Code-First Stored Procedures

Entity Framework Code-First and Code Only

Summary In this blog post I’m going to explain the basics of Entity Framework code-first. I’ll show how to setup your context so that a database is not generated. Code-First / Code-Only If your database is already in place, then the most obvious method of using EF is to use Database First. This is where … Read moreEntity Framework Code-First and Code Only

XML Serializing Nullable Optional Attribute

Summary The title of this blog post is a bit of a mouth-full. I do a lot of xml serialization and de-serialization. It’s all part of the new paradigm of using APIs to communicate with other systems over the Internet. One of the annoying “features” of the xml serializer is that it doesn’t support nullable … Read moreXML Serializing Nullable Optional Attribute

Unit Testing Methods that Call Stored Procedures

Summary One of the biggest problems I used to find in unit testing is that most of the products I work on contain mostly methods that access a database. I found that most objects and methods work with data and it’s very tedious to try and mock or fake the database component. If you’ve followed … Read moreUnit Testing Methods that Call Stored Procedures