This is post #7 in a series about the recently released Entity Framework Feature CTP4, also known as “EF Magic Unicorn Edition”. In this post we are going to take a look at different options for the shape of the table(s) that store entities in an inheritance hierarchy. Disclaimer: The Fluent API for mapping to … Continue reading EF CTP4 Tips & Tricks: Code First Inheritance Mapping
EF CTP4 Tips & Tricks: Testing With Fake DbContext
This post is based on a pre-release version of Entity Framework. An updated post is available here. This is the sixth in a series of posts about the recently released Entity Framework Feature CTP4, now affectionately known as “EF Magic Unicorn Edition”. In this post we are going to take a look … Continue reading EF CTP4 Tips & Tricks: Testing With Fake DbContext
EF CTP4 Tips & Tricks: Querying Navigations Without Loading
This is the fifth in a series of posts about the recently released Entity Framework Feature CTP4, now affectionately known as “EF Magic Unicorn Edition”. Today we are going to take a look at how to query the contents of the navigation property of a loaded entity without loading the contents of that navigation into … Continue reading EF CTP4 Tips & Tricks: Querying Navigations Without Loading
EF CTP4 Tips & Tricks: Running Additional DDL
This is the fifth in a series of posts about the recently released Entity Framework Feature CTP4, now affectionately known as “EF Magic Unicorn Edition”. For this post I’m going to assume you have a basic knowledge of Code First using DbContext. One common question I hear is “how do I include additional indexes (or … Continue reading EF CTP4 Tips & Tricks: Running Additional DDL
EF CTP4 Tips & Tricks: WCF Data Service on DbContext
This is the fourth in a series of posts about the recently released Entity Framework Feature CTP4, now affectionately known as “EF Magic Unicorn Edition”. For this post I’m going to assume you are somewhat familiar with the Productivity Improvements for EF and WCF Data Services. You can download the completed VS2010 project from this … Continue reading EF CTP4 Tips & Tricks: WCF Data Service on DbContext
EF CTP4 Tips & Tricks: Mapping to an Existing Database
This is the third in a series of posts about the recently released Entity Framework Feature CTP4 (AKA “EF Magic Unicorn Edition”). Most of the samples/demos of Code First so far have focused on creating a new database that is generated from a set of classes, however Code First also can be used in scenarios … Continue reading EF CTP4 Tips & Tricks: Mapping to an Existing Database
EF CTP4 Tips & Tricks: Find
This is the second in a series of posts taking a quick look at the some of the features in the recent Entity Framework Feature CTP4, also recently dubbed “EF Magic Unicorn Edition”. In the last post we looked at Include with lambda and today we are going to look at the new Find method. … Continue reading EF CTP4 Tips & Tricks: Find
EF CTP4 Tips & Tricks: Include with Lambda
The release of Entity Framework Feature CTP4 was recently announced and included some walkthroughs touching on the core functionality included in the CTP. Over the next couple of weeks I’m going to post up a series of short articles that cover some of the finer points in the CTP. The CTP includes some work called … Continue reading EF CTP4 Tips & Tricks: Include with Lambda
Entity Framework (EF) – Events
Introduction In this post we are going to take a look at some of the events that are raised by various parts of the Microsoft ADO.NET Entity Framework (EF). I’m using the recently released Beta 1 of Visual Studio 2010 / .Net Framework 4.0 for this demo but most of the information also applies to … Continue reading Entity Framework (EF) – Events
NTier with Entity Framework (EF) 4 Beta 1 – (VS2010 / .Net 4.0 Beta 1)
Introduction My blog has been feeling very neglected after my move to the US and I thought with the recent release of Visual Studio 2010 / .Net Framework 4.0 Beta 1 it would be a good time to get back into a regular blogging rhythm. So for the first post I thought I’d run through … Continue reading NTier with Entity Framework (EF) 4 Beta 1 – (VS2010 / .Net 4.0 Beta 1)
Emailing an SSRS Report using ReportViewer
Introduction SQL Server Reporting Services (SSRS) is Microsoft’s offering in the reporting space, if you install SSRS as part of a SQL Server install you get a nice web front end through which users can navigate and view reports. But SSRS is not restricted to this online portal style access, reports can be embedded into … Continue reading Emailing an SSRS Report using ReportViewer
Programmatic ASP.Net Post Back
Introduction This post is somewhat related to my last post that discussed using the Web Dev Server, that ships with VS, to hit ASP.Net web pages from a unit test. In this post I’m going to cover how to fake a user initiated post back from C# code, this example will mimic a button click … Continue reading Programmatic ASP.Net Post Back
ASP.Net Website Tests using Web Dev Server
Introduction One of the great features that came with VS2005 was the Web Dev Server which allows us to run and debug web applications on our development box without the need to install IIS. As with most cool gadgets used by Visual Studio the web dev server is actually also a standalone component that we … Continue reading ASP.Net Website Tests using Web Dev Server
Searchable / Dependant Parameters in SSRS
Introduction The idea behind this post came from a question from a colleague, they wanted an SSRS report where they could select from a list of employees but the list could be filtered by searching on the surname (i.e. you enter ‘S’ and it would load a dropdown of all employees whose surname start with … Continue reading Searchable / Dependant Parameters in SSRS
SSRS Custom Code (Expressions, Embedded Code & External Assemblies)
Introduction In this article we will look at the options for using custom .Net code in our Microsoft SQL Server Reporting Services (SSRS) reports. This post assumes you have a working knowledge of SSRS. There are three main ways to use code to help generate our reports, in increasing order of complexity (and therefore flexibility) … Continue reading SSRS Custom Code (Expressions, Embedded Code & External Assemblies)
Adjusting WCF default message limits
Introduction So if you are reading this post you’ve probably discovered that when publishing a WCF service there are certain default limits imposed on the messages being sent and received. For example arrays are limited to 16384 elements, strings are limited to 8192 characters and the total message is limited to 64K. Now of course … Continue reading Adjusting WCF default message limits
Programmatically generating web service calls
Introduction I recently wanted make a call to a third party web service without the use of a proxy class. The code shown in this post will allow you to programmatically build and submit a web service call using the HttpRequest class. Import Namespaces Add the following lines to import the required namespaces Build an … Continue reading Programmatically generating web service calls
Transmitting Images in WCF – Databinding Images in WPF
Introduction This was an interesting scenario I came across; I had a WPF application consuming a WCF service that was returning information about employees. I needed to add the ability to display a thumbnail photo of the employee. The thumbnails in question were stored alongside the other employee data in an MSSQL 2005 database using … Continue reading Transmitting Images in WCF – Databinding Images in WPF
Horizontally Centred Dynamic Images in SSRS
Centring Dynamic Logos in SSRS This was an interesting problem I ran into the other day, basically I have a report that displays data on a range of businesses. The report then needed a dynamic header to display the logos for each of the businesses that feature in the report. The number of businesses could … Continue reading Horizontally Centred Dynamic Images in SSRS
Invalid value for ‘OSVersion’
If you have a Visual Studio Solution that is failing to build with the error message Invalid value for 'OSVersion' the simplest way to fix this is to set an explicit value for OSVersion in your project file; Navigate to your projects folder in the file system Locate the project file (.csproj for C# .vbproj for … Continue reading Invalid value for ‘OSVersion’