Loading Entity Framework Related Entities with AutoMapper and Reflection

In a previous post I mentioned how we would be using AutoMapper to create Data-Transfer Objects out of Entity Framework entities; the DTOs would then be transmitted over a WCF service. Well, as often happens, a new requirement surfaced recently, and the solution we came up with turned out to be pretty useful, so now I'm sharing it with you all. The Problem The issue we had was this: because this app needs to keep performance in mind (and because... Read more >

Mapping Entity Framework Entities to DTOs with AutoMapper

One of the projects that my team is working on is a major WCF service that will serve as a hub for our company-specific data. This hub will allow multiple other projects to query for and receive certain data. Because we want to use Entity Framework for the data-access layer and WCF for the service layer, we figured we could just use the created Entity Framework Code First classes as DataContracts over WCF. Something like this: [Table("Team"... Read more >

X509CertificateValidationMode in .NET 4.5

I'm setting up a service using .NET 4.5 to run with a new app we're writing which uses X509CertificateValidationMode: client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None; This service was build in .NET 4.0, where that enumeration exists in System.ServiceModel.Security. However, I was getting compilation errors when trying to access that enumeration, even though I was referencing System.ServiceModel.Security. What was really odd was that if I changed my project to use .NET 4.0, I... Read more >