Print Page | Close Window

Code First Error Message

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3705
Printed Date: 21-Jan-2026 at 5:31pm


Topic: Code First Error Message
Posted By: Vonzkie
Subject: Code First Error Message
Date Posted: 10-Oct-2012 at 1:10am
Hi,

We are experiencing difficulty most of the time when we try to use our Code First Model that has a minor mismatch of Schema in the database. 

(E.g. in Model the field is nullable and in the Database it is not)

What I mean is to say is that, we can successfully build our project and the ibmx file is updated but when using the actual model to query or by simply instantiating it, a weird error occurs.

The problem here is that there is no "Friendly Error Message" being thrown during build time or runtime that can easily help the developers to pinpoint the issue.

Are there some configuration that we need to consider or something that might help us?

Thanks,
Von



Replies:
Posted By: kimj
Date Posted: 10-Oct-2012 at 8:39am
What error message are you getting?  Generally, it's EF that generates the error and, although cryptic, it usually explains the problem. 
 
DevForce Code First build time support does detect a number of mapping issues early, which you wouldn't normally see until run time.  But there's always room for improvement. 



Print Page | Close Window