views:

673

answers:

2

I just added a newly created SP to my project which unfortunately required a temp table to operate, so I had to build my RESULT class for the SP manually. Now when I try to run I get a "Bad Storage Property" error on the below property.

public partial class sp_One_EVA_Get_User_InformationResult
{
    private string _Security_USER_ID;

public sp_One_EVA_Get_User_InformationResult()
    {
    }

    [Column(Storage = "_Security_USER_ID;", DbType="VarChar(15) NOT NULL")]
    public string Security_USER_ID
    {
        get
        {
            return this._Security_USER_ID;
        }
        set
        {
            if ((this._Security_USER_ID != value))
            {
                this._Security_USER_ID = value;
            }
        }
    }

Not sure what is wrong with this, I have done this numerous times with other SP without any error.

+1  A: 

It may be this line that is in error:

[Column(Storage = "_Security_USER_ID;", DbType="VarChar(15) NOT NULL")]

I would double check the DbType of the attribute (VarChar(15) NOT NULL) against what is actually being returned from the database. Most likely there is a mismatch between the two.

Andrew Hare
+2  A: 

Write this line

[Column(Storage = "_Security_USER_ID", DbType="VarChar(15) NOT NULL")]

you have write Storage with error , whith semicolon

ole6ka