Entity Framework Joins

In a previous post we saw that it is recommended to use navigation properties in Linq to SQL. But, what if you don’t have navigation properties and still want to join two tables? The answer is in the question: use the join operator. Below is the query that I built. Note that I want to return…

Call assembly that uses EF

I wanted to call an ExceptionHandler in a helper class. The ExceptionHandler uses Entity Framework to store the error. Then I tried to call the ExceptionHandler from a Logic App. The Logic App selects data, but does so via ADO.Net and not via the Entity Framework. The first error I received is that the EF…

EF query cannot return complex type

Another error you can recieve from the Entity Framework is the following: The entity or complex type <complex type> cannot be constructed in a LINQ to Entities query Here is the query that I used and didn’t work: List<ProcessDefinition> entries = (from PD in contextCommon.ProcessDefinitions where PD.Process.SourceSystem == sourceSystem && PD.Process.MessageType == messageType && PD.Process.ResolveProcess…

EntityValidationErrors in Entity Framework

After executing an Entity Framework query, I received the following error: Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details. This is a very generic exception that didn’t gave me a clue what the problem was. I following a recommendation to add an exception handler for type DbEntityValidationException. This exception revealed…