Add a Complex property to EF 6.1 Model to handle Null value


I am using Database First to design a Model for access to a database.  In the Stored Procedure I have a field that allows NULL values.  I have created the Entity Data Model as a separate Project that I can access from several applications as needed with the proper references.  When I was mapping the Stored Procedures I can't figure out exactly how to code for a field that is allowed to be null in the table.  The EF identifies the field with an extra line in the Stored Field Mapper of "@ IsNull_Table_FullDescription:int".

Here is the table "tblSupportTables" list of properties:

Field                                      Type
Table_ID                               int
Table_DateAdded              DateTime
Table_DateModified         DateTime
Table_CodeSequence      Int32
Table_RecordStatus         String
Table_Name                      String
Table_Version                   String
Table_FriendlyName       String
Table_BriefDescription   String
Table_FullDescription     String

The field "Table_FullDescription" can be NULL.  So when I mapped fields the Update and Delete Mappings added a new field. "IsNull_Table_FillDescription", with "int" as the type.

I think I have to create a new complex property?  Is this correct?  In VB.NET how would I write the code for this property?  The examples I have seen don't clearly show me so that is why I need your advice.  Thanks!
Peter AllenAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter AllenAuthor Commented:

Unfortunately not.  It does clearly explain the steps, but the Function Import and references to Stored procedures do exist.  What I need to do is to figure out how to handle the IsNull_Table_FullDescription property in the Stored Procedure mapper.  The field is int.

Do I just add an int property manually or some type of function?  In the Mapper I have the columns:

Use Original Value
Rows Affected Parameter

When the Stored Procedure was brought it its schema added ISNull_Table_FullDescription for the Update and Delete Stored procedures because that field can contain a null value.  Now with EntityFramework I need to map this field.  I can handle the int value when returned to the application, but wasn't quite sure if I just create a property or what....
Peter AllenAuthor Commented:

Here is the error from VisualStudio Stored Procedure Mapper:

Error 2037: A mapping function bindings specifies a function nsSupportTables.Store.stProc_SupportTablesDelete but does not map the following function parameters: IsNull_Table_FullDescription.      D:\Developement\VisualBasic 2013\ICMTS\TableEDMModels\ICMTS-SupportTablesModel\ICMTS-SupportTablesModel\SupportTablesModel.edmx      415      423      ICMTS-SupportTablesModel
Sorry I don't have much experience with this. I have added some more zones to the question hoping that someone else may be able to pick this up.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.