LINQ Bad Storage Property Error for Stored Procedure

I just added a new project to my project, which unfortunately required a temporary table to work, so I had to create the RESULT class for the SP by hand. Now when I try to run, I get the "Bad storage" error in the property below.

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's wrong with this, I've done this many times with a different SP without error.

+1


a source to share


2 answers


Write this line

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



you have an error entry with a semicolon

+2


a source


Perhaps this line is wrong:

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

      



I would double check the DbType

attribute ( VarChar(15) NOT NULL

) for what is actually being returned from the database. Most likely there is a mismatch between the two.

+1


a source







All Articles